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)

New User

5+ Year Member

joined:Aug 22, 2008
posts: 5
votes: 0

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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Dec 13, 2009
votes: 0

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)

New User

5+ Year Member

joined:Aug 22, 2008
votes: 0

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.