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)
-   -   Content on home page only? (https://forum.x-cart.com/showthread.php?t=14718)

jb5ep 06-22-2005 12:41 AM

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,

pauldodman 06-22-2005 01:10 AM

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.

jb5ep 06-22-2005 07:44 AM

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
)


All times are GMT -8. The time now is 05:09 AM.

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