One question I see often is “How do I change the title of the X-Cart landing page (home.php) but let X-Cart control the rest of the page titles normally. It’s simple, and in my honest opinion (which is worth less than… nevermind) should be included in the standard build of x-cart. Nevertheless, here is how you do it:
In customer/home.tpl, replace this:
<title>{strip}
{capture name=title}
{if $config.SEO.page_title_format eq “A”}
{section name=position loop=$location}
{if not %position.first%} :: {/if}
{$location[position].0|strip_tags|escape}
{/section}
{else}
{section name=position loop=$location step=-1}
{if not %position.first%} :: {/if}
{$location[position].0|strip_tags|escape}
{/section}
{/if}
{/capture}
{if $config.SEO.page_title_limit <= 0}
{$smarty.capture.title}
{else}
{$smarty.capture.title|replace:” ”:” “|truncate:$config.SEO.page_title_limit|replace:” “:” ”}
{/if}
{/strip}</title>
and replace it with this:
<title>
{if $main eq “catalog” and $current_category.category eq “”}
Insert your keyword-rich title here
{else}
{strip}
{capture name=title}
{if $config.SEO.page_title_format eq “A”}
{section name=position loop=$location}
{if not %position.first%} :: {/if}
{$location[position].0|strip_tags|escape}
{/section}
{else}
{section name=position loop=$location step=-1}
{if not %position.first%} :: {/if}
{$location[position].0|strip_tags|escape}
{/section}
{/if}
{/capture}
{if $config.SEO.page_title_limit <= 0}
{$smarty.capture.title}
{else}
{$smarty.capture.title|replace:” ”:” “|truncate:$config.SEO.page_title_limit|replace:” “:” ”}
{/if}
{/strip}{/if}</title>
In the second set of code, replace the Insert Your Title Here… with the tile you’d like on the main page. It’s that simple!
UPDATE: In X-Cart 4.2 this has changed.
in file skin1/customer/service_head.tpl
Code:
<title>{$html_page_title|escape}</title>
to
Code:
<title>
{if $main eq "catalog" && $current_category.category eq ""}
Place you homepage title here
{else}
{$html_page_title|escape}
{/if}
</title>