| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
if statement for homepage | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
I would like display location.tpl on every page except for the homepage. Is there an {if} statement I can incorporate into home.tpl to do this.
__________________
Version 4.1.8 |
|||||||
|
#2
|
|||||||
|
|||||||
|
in file, skin1/customer/home.tpl
FIND: Code:
Code:
Basically, if the current category is not empty, show location.tpl. Ok? Hope this works for you. --Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
|
#3
|
|||||||
|
|||||||
|
Thanks for that, points me in the right direction, used the following so it shows on product.tpl as well
{if $current_category.category ne ""} {include file="location.tpl"} {/if}
__________________
Version 4.1.8 |
|||||||
|
#4
|
|||||||||
|
|||||||||
|
Every page except the home page would require:
Code:
Code:
Here's the code break-down: $main ne "catalog" - If the page is not the home page or a category OR ($main eq "catalog" and $current_category.category ne "") - If we are on the home page or the category, only show location.tpl if there is a category specified (i.e. not the homepage). |
|||||||||
|
#5
|
|||||||
|
|||||||
|
Exactly what I needed, Thanks !
__________________
Version 4.1.8 |
|||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||