Skip to content

Instantly share code, notes, and snippets.

@greystate
Created February 25, 2011 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save greystate/843919 to your computer and use it in GitHub Desktop.
Save greystate/843919 to your computer and use it in GitHub Desktop.
Shorter version of http://pastebin.com/eWeLPq33
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:umb="urn:umbraco.library"
exclude-result-prefixes="umb"
>
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<xsl:param name="currentPage" />
<xsl:template match="/">
<title>
<xsl:value-of select="($currentPage/pageTitle | $currentPage/@nodeName[not(normalize-space(../pageTitle))])[1]" />
<xsl:if test="normalize-space(macro/fixedTitle)"> | <xsl:value-of select="macro/fixedTitle" /></xsl:if>
</title>
<meta name="description" content="{$currentPage/metaDescription}" />
<meta name="keywords" content="{$currentPage/metaKeywords}" />
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment