Test in wrapper if search page?

Options

Is there a way to test in the wrapper if it is a search page?

I tried checking the PATH and URL, but those are empty when it is a search page. I could check if those are empty, but then I worry other system pages might have those properties empty as well.

Tagged:

Comments

  • Yes, you can test ${page.filename} to see if it is search.jsp.

  • rdunn :

    Yes, you can test ${page.filename} to see if it is search.jsp.

    Thank you, it works. Also, the page.folder also works as well.

    Do I need to move away from using $ in the wrapper for future proofing my wrapper?

  • Seamus Leahy:

    Thank you, it works. Also, the page.folder also works as well.

    Do I need to move away from using $ in the wrapper for future proofing my wrapper?

    Using page.folder.path would not be a bad idea if your code needs to work for the "special" system pages like search.jsp.

Categories