Quote:
Originally Posted by ecommerce
Quote:
Originally Posted by geckoday
I think you are working too hard. Instead of changing code all over the place, try this approach. In home.tpl add this before the third column HTML:
Code:
{if $main eq "catalog" and $current_category.category eq ""}
Then after the last line of the third column HTML in home.tpl add:
|
Geckotoday, can u please explain what this does in plain newbie terms?
|
home.tpl is used to display a whole bunch of different site pages - the home page, category pages, help pages, etc. The php code that uses home.tpl assigns a value to variable $main to tell the template what should be displayed. If it is to display a category $main is set to "catalog" and $current_category.category is set to the category name. If the home page is to be displayed $main is set to "catalog" and $current_category.category is set to an empty string.
The smarty {if ...} {/if} defines a block of html and smarty code that should only be included if the condition in the {if ...} is true.
So putting the third column inside the {if ...} and {/if} means it will only be displayed if the condition inside the if is true. In this case if $main is set to "catalog" and $current_category is an empty string - the condition for displaying the home page.
So the third column will only be displayed on the home page.
Which come to think of it isn't exactly what was being asked for. To remove the third column from only the category pages it really should be this:
Add this before the third column HTML:
Code:
{if $main eq "catalog" and $current_category.category ne ""}
{else}
Then after the last line of the third column HTML in home.tpl add:
So do you know what $main is set to for what page? Take a look at home_main.tpl.