Applying Page Numbering to AspDotNetStorefront Page Title

How To:  Applying Page Numbering to AspDotNetStorefront Page Title

Applies To:  AspDotNetStorefront versions 8 and above

To increase Google's page ranking, we add " - Page 2" to category pages after page one.  This will reduce "duplicate content" issues with Google.

Update the Entity.xml.config:

Add this section right before the ending </package> tag.

<SearchEngineSettings>
    <SETitle actionType="transform">
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
            <xsl:output method="html" omit-xml-declaration="yes" />
            <xsl:param name="EntityName">
                <xsl:value-of select="/root/Runtime/EntityName" />
            </xsl:param>
            <xsl:param name="EntityID">
                <xsl:value-of select="/root/Runtime/EntityID" />
            </xsl:param>
            <xsl:param name="CurrentEntityNode" select="/root/EntityHelpers/*[name() = $EntityName]//Entity[EntityID = $EntityID]" />
            <xsl:template match="/">
                <xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/SETitle)" disable-output-escaping="yes" /><xsl:if test="/root/QueryString/pagenum > 1"> - Page <xsl:value-of select="/root/QueryString/pagenum" disable-output-escaping="yes" /></xsl:if>
            </xsl:template>
        </xsl:stylesheet>
    </SETitle>
    <SectionTitle actionType="transform">
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
            <xsl:output method="html" omit-xml-declaration="yes" />
            <xsl:param name="EntityName">
                <xsl:value-of select="/root/Runtime/EntityName" />
            </xsl:param>
            <xsl:param name="EntityID">
                <xsl:value-of select="/root/Runtime/EntityID" />
            </xsl:param>
            <xsl:param name="CurrentEntityNode" select="/root/EntityHelpers/*[name() = $EntityName]//Entity[EntityID = $EntityID]" />
            <xsl:template match="/">
                <xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/SETitle)" disable-output-escaping="yes" /><xsl:if test="/root/QueryString/pagenum > 1"> - Page <xsl:value-of select="/root/QueryString/pagenum" disable-output-escaping="yes" /></xsl:if>
            </xsl:template>
        </xsl:stylesheet>
    </SectionTitle>
    <SEDescription actionType="transform">
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
            <xsl:output method="html" omit-xml-declaration="yes" />
            <xsl:param name="EntityName">
                <xsl:value-of select="/root/Runtime/EntityName" />
            </xsl:param>
            <xsl:param name="EntityID">
                <xsl:value-of select="/root/Runtime/EntityID" />
            </xsl:param>
            <xsl:param name="CurrentEntityNode" select="/root/EntityHelpers/*[name() = $EntityName]//Entity[EntityID = $EntityID]" />
            <xsl:template match="/">
                <xsl:choose>
                    <xsl:when test="/root/QueryString/pagenum > 1"><xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/SEDescription)" disable-output-escaping="yes" /> - Page <xsl:value-of select="/root/QueryString/pagenum" disable-output-escaping="yes" /></xsl:when>
                    <xsl:otherwise><xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/SEDescription)" disable-output-escaping="yes" /></xsl:otherwise>
                </xsl:choose>
            </xsl:template>
        </xsl:stylesheet>
    </SEDescription>
</SearchEngineSettings>


This will make your page title's be something like: "Entity Name - Page 2"

My example also shows how to update the breadcrums by updating SectionTitle.


Article ID: 19, Created On: 4/30/2012, Modified: 4/30/2012