View Single Post
Old 06-29-2003, 11:22 AM
walteis walteis is offline

Advanced Member
Join Date: Jan 2003
Location: USA
Posts: 65

Default Optimizing Page Title Text

From what I've read, extra spaces or non-displaying characters (like CR or LF) make search engines unhappy, so to speak. I've noticed that x-cart seems to put some of those in there however.

The following smarty 2.5.x code will fix that problem. Add to customer/home.tpl
{assign var="loc" value=" "} {if $main eq "catalog"} {if $location eq ""} {assign var="loc" value=$lng.txt_subtitle_home|strip} {else} {section name=index loop=$location} {assign var="loc" value=$loc|cat:" - "} {assign var="loc" value=$loc|cat:$location[index].0|strip} {/section} {/if} {elseif $main eq "product"} {assign var="loc" value=" - "|cat:$product.product|strip|default:""} {elseif $main eq "help"} {assign var="loc" value=$lng.txt_subtitle_help} {elseif $main eq "cart"} {assign var="loc" value=$lng.txt_subtitle_cart} {elseif $main eq "checkout"} {assign var="loc" value=$lng.txt_subtitle_checkout} {elseif $main eq "order_message"} {assign var="loc" value=$lng.txt_subtitle_thankyou} {/if} <title>{$lng.txt_site_title}{$loc}</title>

Reply With Quote