Hi cinelson,
Thats my blog that was linked here, I hope you find it useful. I though I'd elaborate a little here.
A ProStore site CAN be configured with unique meta description and keyword tags. (
i tend not to use the meta keyword tag as its almost totally useless for seo and completely useless for increasing your ranking.)
The code applies a logic statement that says, "If the page already has a meta description/keyword/s specified for it show them otherwise show this text." the directive code is for pages that don't have meta tags text for them and you want to use something other than the default text you specified.
You can get even more complex if you want if you know how to program in SSML. I've got
Sporting Goods and School Spirit Apparel | ForSports to insert the category description text as the meta description as well for categories and subcategories. But on item pages it uses the ProStores default. But again you can configure that too if you want. There are a lot of different ways to configure it if you know how. :-)
The code I posted in my blog is as follows:
Quote:
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"/>
|