Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
Hi Lee
What does the rendered markup look like now?
/Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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
Hi Lee
What does the rendered markup look like now?
/Jan
is working on a reply...