Results 1 to 2 of 2

Thread: Set title tag in xmlpackage

  1. #1
    Join Date
    Jan 2007
    Posts
    56

    Default Set title tag in xmlpackage

    Using AspDotNetStorefront Multistore 9.1.0.1/9.1.0.0,

    Is there a way in xmlPackages to set title tag, meta keywords and meta description?

    Thanks.
    AspDotNetStorefront Multistore 9.1.0.1/9.1.0.0 with sourcecode

  2. #2
    Join Date
    Jan 2007
    Posts
    56

    Default

    I am hard coding title and meta info so here is how I did it:

    Code:
    '......
    
    </PackageTransform>
    
        <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:template match="/">
                        <xsl:apply-templates select="/root/NewsArticles/Article" />
                    </xsl:template>
                    
                    <xsl:template match="Article">
                        <xsl:param name="setoutput">
                            <xsl:choose>
                                <xsl:when test="NewsID=1 and /root/QueryString/showarticle=1">
                                    <xsl:value-of select="'title text here'" />
                                </xsl:when>
                                <xsl:when test="NewsID=2 and /root/QueryString/showarticle=2">
                                    <xsl:value-of select="'title text here'" />
                                </xsl:when>
                                <xsl:when test="NewsID=3 and /root/QueryString/showarticle=3">
                                    <xsl:value-of select="'title text here'" />
                                </xsl:when>
    
                            </xsl:choose>
                            
                        </xsl:param>
                        <xsl:value-of select="$setoutput"  disable-output-escaping="yes" />
                    </xsl:template>
                </xsl:stylesheet>
            </SETitle>
            <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:template match="/">
                        <xsl:apply-templates select="/root/NewsArticles/Article" />
                    </xsl:template>
                    <xsl:template match="Article">
                        <xsl:param name="setoutput">
                            <xsl:choose>
                                <xsl:when test="NewsID=1 and /root/QueryString/showarticle=1">
                                    <xsl:value-of select="'meta description here'" />
                                </xsl:when>
                                <xsl:when test="NewsID=2 and /root/QueryString/showarticle=2">
                                    <xsl:value-of select="'meta description here'" />
                                </xsl:when>
                                <xsl:when test="NewsID=3 and /root/QueryString/showarticle=3">
                                    <xsl:value-of select="'meta description here'" />
                                </xsl:when>
                                
    
                            </xsl:choose>
                        </xsl:param>
                        <xsl:value-of select="$setoutput"  disable-output-escaping="yes" />
                    </xsl:template>
                </xsl:stylesheet>
            </SEDescription>
        </SearchEngineSettings>
    </package>
    Here is another post with good info: SearchEngineSettings
    AspDotNetStorefront Multistore 9.1.0.1/9.1.0.0 with sourcecode

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •