Log in

View Full Version : How to Check for Page Type


ShannonA
01-26-2006, 05:16 PM
I've been trying to figure out the best method for displaying a modified footer only on certain pages (only on showthread.php, as it happens).

Usually I'd just set a variable in global_start, then display it, but I can't figure out how to tell what page I'm on when I'm in global_start.

As an alternative I thought about trying to change my GLOBALS variable down in an appropriate hook (say, postbit_display_start), but that doesn't seem to work either. (The change is never seen when I get to the footer.)

Any ideas on the best way to do this?

amykhar
01-26-2006, 05:20 PM
check the THIS_SCRIPT variable is usually the best way.

ShannonA
01-26-2006, 05:44 PM
Thanks.

if (THIS_SCRIPT == "showthread") {

did the trick!