homepage Welcome to WebmasterWorld Guest from 54.161.191.254
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
"if" statement relative path
if statement not working
mgravlee




msg:4080853
 11:14 pm on Feb 15, 2010 (gmt 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"}
{script}
</if>

 

Readie




msg:4080960
 2:05 am on Feb 16, 2010 (gmt 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:

../default/user/userforgot.tpl


.php
.tpl

mgravlee




msg:4081253
 12:46 pm on Feb 16, 2010 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved