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

Content on home page only?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-22-2005, 12:41 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default Content on home page only?

Hi folks,

Anyone out there know what my {if} statement would look like if I only wanted to include something on the 'home' (home.php) page? e.g.:

Code:
{if insert stuff here i don't know....} {include file="custom.tpl"} {/if}

I'm sure this is blindingly obvious but i've searched here and nothing's returned for 'home'(!).

Cheers,
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #2  
Old 06-22-2005, 01:10 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

Hi,

believe you need something like this:

{if $main eq "catalog" and $current_category.category eq ""}
STUFF FOR HOME PAGE HERE
{else}
STUFF FOR OTHER PAGES HERE
{/if}

put this on customer/home.tpl

For example this:
{if $main eq "catalog" and $current_category.category eq ""}
{else}
{include file="location.tpl"}
{/if}

removes the location bar from the home page.

I think this will work; try searching the forum for something like that if you want some more info on it, but I think that will get you in the right direction.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 06-22-2005, 07:44 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

Hi Paul,

That's done the trick, thanks.

(you were right - this has already been posted under a slightly cryptic topic title here:

http://forum.x-cart.com/viewtopic.php?t=18807&highlight=currentcategory+ca tegory
)
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
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 06:21 AM.

   

 
X-Cart forums © 2001-2020