Quote:
Originally Posted by snowboard
Hello,
How do you do an if statement to add content to the head section of the home page only?
I know to add to category page, you use {if $cat eq "xxx"} CODE {/if}
But how do you do an if statement for the home page?
|
You can determine any page variable by using
webmaster mode.
xcart_admin > Tools > Webmaster mode
Not only can you see the template structure, you can also see the variables.
$main is the variable that you want to analyze.
Additionally, if you evaluate the file,
/skin/common_files/customer/home_main.tpl
you will be able to see many of the $main if statements that already are working for you...
the default $main for the home page is:
Code:
{elseif $main eq "catalog" and $current_category.category eq ""}
{include file="customer/main/welcome.tpl"}
which calls welcome.tpl into the main section.
BUT - I hope you don't have to ask for a $main variable here again -- the power is right in front of you!!!