PDA

View Full Version : Conditional for 'Is In Template Group'?


alegend
12-10-2010, 06:20 AM
Hi,

I am trying to display a widget only when the visitor is within a standard forum page (eg. showthread, forumdisplay, etc.), but not on my custom pages (eg. xx.com/custom-page.php).

All our custom templates are in the 'Custom Templates' group. Is there a way to detect within a template if THIS_SCRIPT is in a template group? Alternatively is there a conditional to check if the template is a custom template?

Thanks in advance,
R.

kh99
12-10-2010, 12:55 PM
Could you define() a value in your custom page then check for that?

alegend
12-10-2010, 03:49 PM
Hey kh99, I thought of doing that, but it would mean I'd have to define that value on every page custom template, which is a bit cumbersome.

I was hoping to wrote a conditional against a standard VBulletin value. Thanks for the suggestion though!

kh99
12-10-2010, 03:57 PM
I guess probably I don't entirely understand the way you have things set up, but it seems like you would only have to define it at the top of every .php file you have generating a custom page.

ETA: nvm, you probably know what you're doing. Maybe someone else knows...

alegend
12-10-2010, 06:29 PM
No worries, thanks for the help anyways.

We're trying to avoid editing into the .php files directly so we can make the templates as portable between our development and live environment.