![]() |
Page Specific "If" Statements
I know how to make a .tpl file include (or not) on the Homepage by using a specific {if} statement (see below) and another to include somethign based on the category number (also below). But what are the statements I can make for the other pages? For example, what do I write to get a file to include only on the Contact Us page? In my store I have a .tpl file that displays which days the physical store is open. On the contact page, I'd like to include this file on my Contact Us but not on all the other ancillary pages like the cart, or the news page.
IF STATEMENT TO HIDE CART INFO ON HOMEPAGE {if $main ne "catalog" OR ($main eq "catalog" and $current_category.category ne "")} {include file="customer/menu_cart.tpl"} {/if} IF STATEMENT TO SHOW SOMETHING BASED ON CATEGORY {if $cat eq "211"}Show This{/if} I'm quite the newbie getting in and configuring my first store. So far so good. This forum is amazing resource! |
Re: Page Specific "If" Statements
|
Re: Page Specific "If" Statements
Brilliant, PhilJ. I had already read the 'sticky' thread with no help on my specific issue but it was very informative with other {if} statments I'll use eventually. The post about the Webmaster Mode was very, very helpful. For my specific query, I simpy needed to know that the help section is $main eq "help" and webmaster mode showed me that.
|
Re: Page Specific "If" Statements
Matthew, are you hip to this thread? It was invaluable to me. Discovering things such as:
{if $main eq "pages" and $page_data.pageid eq "2"} (for static embedded pages) etc... |
Re: Page Specific "If" Statements
Take a look at customer/home_main.tpl and for more esoteric stuff common_template.tpl
|
Re: Page Specific "If" Statements
Quote:
If I am reading this correctly, all you need to do is open the Contact Us template (/skin1/help/contactus.tpl) and insert the line: {include file="yourpathandfile.here"} no if's needed... |
All times are GMT -8. The time now is 10:31 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.