-
-
Save leekelleher/847484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:umbraco.library="urn:umbraco.library" | |
exclude-result-prefixes="umbraco.library"> | |
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" /> | |
<xsl:param name="currentPage" /> | |
<xsl:variable name="separator" select="string('|')" /> | |
<xsl:variable name="fixedTitle" select="/macro/fixedTitle" /> | |
<xsl:template match="/"> | |
<xsl:apply-templates select="$currentPage" /> | |
</xsl:template> | |
<xsl:template match="*[@isDoc]"> | |
<title> | |
<xsl:value-of select="(pageTitle | @nodeName[not(normalize-space(../pageTitle))])[1]" /> | |
<xsl:if test="normalize-space($fixedTitle)"> | |
<xsl:value-of select="concat(' ', $separator, ' ')" /> | |
<xsl:value-of select="$fixedTitle" /> | |
</xsl:if> | |
</title> | |
<meta name="description" content="{metaDescription}" /> | |
<meta name="keywords" content="{metaKeywords}" /> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Little revisions... just playing with forks.