![]() |
if statement for homepage
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.
|
Re: if statement for homepage
in file, skin1/customer/home.tpl
FIND: Code:
{include file="location.tpl"} Code:
{if $main eq "catalog" and $current_category.category ne ""} Basically, if the current category is not empty, show location.tpl. Ok? Hope this works for you. --Jeremy |
Re: if statement for homepage
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} |
Re: if statement for homepage
Every page except the home page would require:
Code:
{if $main ne "catalog" OR ($main eq "catalog" and $current_category.category ne "")} 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). |
Re: if statement for homepage
Exactly what I needed, Thanks !
|
All times are GMT -8. The time now is 04:39 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.