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

Help with url conditional

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-10-2008, 05:25 AM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default Help with url conditional

Hi,

I want to create a conditional statement based on the url/page displayed. In this case, the home.php page.

I created this statement but it doesn't work.

{if $http_location eq "http://www.mountainhomebuildingproducts.com/home.php"}
<td>test</td>
{/if}

When the url is loaded, the conditional html does not display. What am I doing wrong?

Thanks
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
  #2  
Old 01-10-2008, 05:58 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Help with url conditional

Use this:

{if $main eq "catalog" and $current_category.category eq ""}

show only on home page

{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-10-2008, 06:03 AM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default Re: Help with url conditional

Thanks! That worked perfectly.
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:40 PM.

   

 
X-Cart forums © 2001-2020