El Host Posted October 2, 2008 Share Posted October 2, 2008 I need help to do a code that doesnt show an other in certains pages. For Example: I need that this code not show in Home. I use this: {if $pagetitle != 'Inicio'} XXXXXXX {/if} How Can I do for not show in more pages for example Test and Test1. I tried this, but not work: {if $pagetitle != 'Inicio' || $pagetitle != 'Test'} XXXXXXX {/if} 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted October 3, 2008 Share Posted October 3, 2008 Dunno if this makes a difference, try: {if $pagetitle !== 'Inicio' || $pagetitle !== 'Test'} XXXXXXX {/if} 0 Quote Link to comment Share on other sites More sharing options...
El Host Posted October 3, 2008 Author Share Posted October 3, 2008 Doesnt work, now the code shows in all pages. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted October 4, 2008 WHMCS CEO Share Posted October 4, 2008 You are doing an "is not equal" check. You want to do the opposite: {if $pagetitle eq "Support" || $pagetitle eq "Announcements"} You are on the home or announcements page... {/if} Matt 0 Quote Link to comment Share on other sites More sharing options...
El Host Posted October 4, 2008 Author Share Posted October 4, 2008 I want this code will not show in Home and Test pages, but will show in the others pages. 0 Quote Link to comment Share on other sites More sharing options...
herpherp Posted October 5, 2008 Share Posted October 5, 2008 I want this code will not show in Home and Test pages, but will show in the others pages. changing eq to neq in matts example above should do the trick or you can use an else statements.... {if $pagetitle eq "Support" || $pagetitle eq "Announcements"} This will show on the home or announcements page... {else} This will show if you are not on the announcements or home page {/if} 0 Quote Link to comment Share on other sites More sharing options...
El Host Posted October 5, 2008 Author Share Posted October 5, 2008 (edited) I put: {if $pagetitle neq "Inicio" || $pagetitle neq "Planes de Hosting"} But with this code it shows in all pages. Edit: I did it putting this: {if $pagetitle neq "Inicio"}{if $pagetitle neq "Planes de Hosting"} Edited October 5, 2008 by El Host 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted October 5, 2008 Share Posted October 5, 2008 I put: you needed *AND* nor *OR* 0 Quote Link to comment Share on other sites More sharing options...
El Host Posted October 6, 2008 Author Share Posted October 6, 2008 Only if i put: {if $pagetitle neq "Inicio"}{if $pagetitle neq "Planes de Hosting"} It works, I prefer php. 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.