View Single Post
  #2  
Old 06-23-2013, 04:36 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Edit <head> of home page

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!!!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote