Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

smarty condition not meeting

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-27-2007, 10:29 AM
 
luxor luxor is offline
 

Senior Member
  
Join Date: Apr 2007
Posts: 120
 

Default 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?
__________________
v4.1.8 GOLD
Reply With Quote
  #2  
Old 07-27-2007, 10:59 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default 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}
Reply With Quote
  #3  
Old 07-27-2007, 11:36 AM
 
luxor luxor is offline
 

Senior Member
  
Join Date: Apr 2007
Posts: 120
 

Default Re: smarty condition not meeting

yup works perfectly. Thanks
__________________
v4.1.8 GOLD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:27 AM.

   

 
X-Cart forums © 2001-2020