Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

"if" statement relative path

if statement not working



11:14 pm on Feb 15, 2010 (gmt 0)

5+ Year Member

I need a "if" statement to wrap the adsense script so it doesn't appear in userforgot.php. The adsense script is in /templates/Fluid-Custom/layout.tpl which controls the layout for all pages.

If userforgot.tpl which is the body is one directory up (/templates/default/user/userforgot.tpl), why does this not work? What should it be?

{if $body != "../default/user/userforgot.tpl"}


2:05 am on Feb 16, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

The syntax you're using there looks a bit... wrong :/

Anyway, one thing I did notice is you said you didn't want it to appear in userforgot.php, yet you've specified the following:




12:46 pm on Feb 16, 2010 (gmt 0)

5+ Year Member

Userforgot.php calls layout.tpl (the ad,header,menu,footer,etc)and calls userforgot.tpl as the body or center of the page. i.e.-it uses two templates to make up the page.

Featured Threads

Hot Threads This Week

Hot Threads This Month