Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 95 posts 115 karma points
    Feb 01, 2013 @ 14:39
    Lee
    0

    Returns in XSLT

    Hi

     

    I have created an XSLT to create metadescriptions and metatags, like so:

    <xsl:variable name="metaDescription"><xsl:value-of select="$currentPage/metaDescription"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="string($metaDescription) != ''">
      <meta name="description" content="{$metaDescription}" />
    </xsl:when>
    <xsl:otherwise>
    <meta name="description" content="A specialist veterinary referral centre with 24 hour on-site staffing and associated clinical pathology serving veterinary practices throughout the UK" />
    </xsl:otherwise>
    </xsl:choose>
    <xsl:variable name="metadata"><xsl:value-of select="$currentPage/metaData"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="string($metadata) != ''">
    <meta name="keywords" content="{$metadata}" />
    </xsl:when>
    <xsl:otherwise>
    <meta name="keywords" content="veterinary referrals, veterinary specialists, treatment of pets, pet diseases, dog health, cat health, Cambridge vets, Six Mile Bottom vets, Newmarket vets" />
    </xsl:otherwise>
    </xsl:choose>

     

    This works fine, but is there a way I can have a line break between the two elements

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 01, 2013 @ 17:40
    Jan Skovgaard
    0

    Hi Lee

    What does the rendered markup look like now?

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft