PDA

View Full Version : How can I detect what template the user is viewing?


boggseric
02-26-2010, 03:35 AM
I have added a custom template which works great.

But for this specific template I don't want the ad_navbar_below to be included.

If I could put some kind of conditional in the navbar template that says something to the effect of:

if current_template != sponsors.php then
$ad_location[ad_navbar_below]
end if


That would be perfect for me. Anyone know how I can code this to work?

I am new to this so be gentle. Thanks :p

Eric

Lynne
02-26-2010, 01:39 PM
You can base your condition off of THIS_SCRIPT if that is defined at the top of your page:
<if condition="THIS_SCRIPT == 'sponsors'">
stuff
</if>
(Change 'sponsors' to whatever THIS_SCRIPT is defined as at the top of the sponsors.php page)

boggseric
03-14-2010, 01:28 AM
That did it perfectly. Thanks Lynne!