Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Set title tag in xmlpackage

  1. #1
    lleemon is offline Member
    Join Date
    Jan 2007
    Posts
    57

    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
    lleemon is offline Member
    Join Date
    Jan 2007
    Posts
    57

    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