On the header template, replace default code that looks something like this:
<ss:if test="$page.hasMetaKeywords()">
<meta name="keywords" content="$page.meta.keywords">
</ss:if>
And replace it with something like this:
<ss:choose>
<ss:when test="$page.hasMetaKeywords()">
<meta name="keywords" content="$page.meta.keywords">
</ss:when>
<ss:otherwise>
<meta name="keywords" content="default keywords here used whenever keywords are not defined for a template">
</ss:otherwise>
</ss:choose>
And then add tags that look like this to each of the templates where you want custom Meta keywords:
<ss:directive name="page.meta.keywords" value="this page specific custom meta keywords for page x">
You do not need add this to the Product Detail template. It already includes code that allows you to manipulate product Meta keywords and descriptions through the Product Information page in store administration.
You can apply the same logic to the Meta description content. Replace the default code that looks like this:
<ss:if test="$page.hasMetaDescription()">
<meta name="description" content="$page.meta.description">
</ss:if>
With code that looks like this:
<ss:choose>
<ss:when test="$page.hasMetaDescription()">
<meta name="description" content="$page.meta.description">
</ss:when>
<ss:otherwise>
<meta name="description" content="default description here used whenever it is not defined for a template">
</ss:otherwise>
</ss:choose>
And then add tags that look like this to each body template you want to have a customized Meta description:
<ss:directive name="page.meta.description" value="this page specific custom meta description for page x">
</ss:directive></ss:directive>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment