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)
-   -   smarty condition not meeting (https://forum.x-cart.com/showthread.php?t=32838)

luxor 07-27-2007 10:29 AM

smarty condition not meeting
 
I am trying to place an image (looks like a <hr>) above my navigation line for the template.

However I wish to not have the black line on my front page, so I had tried using the following code to accomplish this:


Code:

{if $main ne "catalog"}

<div class="topblacklinemargin"> <img src="{$ImagesDir}/blacktopline.jpg" width="100%" height="1" /> </div>

{/if}



but this code is now completely eliminating the image on every page.

Does anyone have experience with this that can give me a suggestion on how to accomplish this?

Jon 07-27-2007 10:59 AM

Re: smarty condition not meeting
 
Code:

{if $main ne "catalog" OR ($main eq "catalog" AND $current_category ne "")}
<div class="topblacklinemargin"> <img src="{$ImagesDir}/blacktopline.jpg" width="100%" height="1" /> </div>
{/if}


luxor 07-27-2007 11:36 AM

Re: smarty condition not meeting
 
yup works perfectly. Thanks


All times are GMT -8. The time now is 12:41 AM.

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