skshost Posted March 19, 2007 Share Posted March 19, 2007 In header.tpl {php} if ( $thisPage == 'supporthome' ) { echo "<span class=currentpage>SUPPORT</span>."; } else { echo "<a href=http://my.hostdomain.com/>SUPPORT</a>."; } {/php} In homepage.tpl {php} $thisPage = 'supporthome'; {/php} It's not working, I'm guessing that I need to pass the variable through smarty? 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 22, 2007 Author Share Posted March 22, 2007 ??? 0 Quote Link to comment Share on other sites More sharing options...
generic Posted March 22, 2007 Share Posted March 22, 2007 maybe because the header is coming before the home page template so the variable is not set until after your doing your comparison.. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 22, 2007 Author Share Posted March 22, 2007 Any ideas how I could accomplish this? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted March 23, 2007 WHMCS CEO Share Posted March 23, 2007 Why not use the {$pagetitle} variable that is already available on all pages in your IF statement? Something like {if $pagetitle eq "Support"}do this{/if} Matt 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 28, 2007 Author Share Posted March 28, 2007 Thanks Matt, that was much easier. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.