X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   help with "if url display this, else display this" (https://forum.x-cart.com/showthread.php?t=35919)

itsmeee 12-04-2007 09:10 PM

help with "if url display this, else display this"
 
I'm new to php & smarty languages so I'm sure this will be pretty easy. I'm trying to make my side navigation change on the help.php and ?section=* pages so they are different from the rest of the site. Here is what I tried but it didn't seem to do anything. I've been going through the smarty website but I'm a little in over my head I think.

Code:

{if $smarty.get.pageid eq "help.php"}

content

{else}

other content

[/if]


balinor 12-05-2007 04:41 AM

Re: help with "if url display this, else display this"
 
Not quite right. Try this:

{if $main eq "help"}

show this

{else}

show that

{/if}

You can see many of the $main variables in skin1/customer/home_main.tpl and help/index.tpl

itsmeee 12-05-2007 07:06 AM

Re: help with "if url display this, else display this"
 
Thank you so much, that worked perfectly :)


All times are GMT -8. The time now is 03:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.