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

only on home page {if} statement

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-15-2005, 01:31 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default only on home page {if} statement

Can anyone tell me what the if statement would be if I want to display something ONLY on the home page.

I know for product and products it would be

{if $main eq "product" AND "products"} insert code here {/if}

not sure what would replace "product" AND "products" for just home page.
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #2  
Old 03-15-2005, 01:34 PM
 
balinor balinor is offline
 

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

Default

Here is what I usually use:

Code:
{if $main eq "catalog" and $current_category.category eq ""}stuff{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-15-2005, 01:45 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Hmm that didnt work for me it wiped the page out.

A little explanation of what im trying to do, because the descriptions are so far down in code in x-cart im trying to duplicate it with a hidden layer so that if you view it in lynx the same text is placed at the top and picked up first, so far i've got it working with category descriptions with code like this in home.tpl

Code:
<div id="description" style="position:absolute; left:10px; top:10px; visibility:hidden; z-index:5000;"> <div align="center"> {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":" "} {/if} </div> </div>

What im trying to do is make all the relevant text per page be copied on up in the code, so in products pages the category description is up the top (done), in home page welcome text is copied up to the top (not working), product page copy the product description up to the top (not working - still shows cat text)[/code]
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #4  
Old 03-15-2005, 01:47 PM
 
balinor balinor is offline
 

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

Default

Whoa, you sure you want to do that? Google does not like hidden text.....
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 03-15-2005, 01:52 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Google doesnt detect it if it is CSS, only thing they can detect is if font colour is the same as the background.

What im doing is no different than a site that is created in layers.
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
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 02:14 AM.

   

 
X-Cart forums © 2001-2020