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
The RelatedLinksList.xslt file looks at the homepage primary navigation tab for its nodes to display in the menu.
Please excuse my poor xslt BUT I can't seem to figure how this is linked in.
<xsl:variable name="homepage" select="$currentPage/ancestor-or-self::Homepage"/> <xsl:variable name="nodeIds" select="umbraco.library:Split($homepage/*[name()=$propertyAlias],',')" />
Is it looking at the template name or document type. The top level document is called Home with a Homepage doc type and template.
I would be interested how you pass the values from the primary navigation variable.
I currently get nothing which means that I don't think the script is wired to look at the home page properly.
My templates and doc type are called PageHome. Is this the problem?
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> <xsl:param name="currentPage"/> <xsl:variable name="rootPage" select="$currentPage/ancestor-or-self::root"/> <xsl:variable name="propertyAlias" select="/macro/PropertyAlias"/> <xsl:template match="/"> <xsl:variable name="homepage" select="$currentPage/ancestor-or-self::Homepage"/> <xsl:variable name="nodeIds" select="umbraco.library:Split($homepage/*[name()=$propertyAlias],',')" /> <ul class="navigation fc"> <xsl:for-each select="$nodeIds/value"> <xsl:variable name="linkNone" select="$rootPage//*[@isDoc][@id = string(current()/.)]"/> <xsl:if test="string-length($linkNone/@id)> 0"> <li> <xsl:attribute name="class"> <xsl:if test="$currentPage/ancestor-or-self::*[@level > 1]/@id = $linkNone/@id"> <xsl:text>selected</xsl:text> </xsl:if> <xsl:if test="position() = last()"> <xsl:text> last</xsl:text> </xsl:if> </xsl:attribute> <xsl:choose> <xsl:when test="string-length($linkNone/umbracoUrlAlias) > 0"> <a href="{$linkNone/umbracoUrlAlias}"> <xsl:value-of select="$linkNone/@nodeName"/> </a> </xsl:when> <xsl:otherwise> <a href="{umbraco.library:NiceUrl($linkNone/@id)}"> <xsl:value-of select="$linkNone/@nodeName"/> </a> </xsl:otherwise> </xsl:choose> </li> </xsl:if> </xsl:for-each> </ul> </xsl:template>
I have figured it out. Need to change the Homepage syntax to PageHome which is my doc type/template
<xsl:variable name="homepage" select="$currentPage/ancestor-or-self::PageHome"/>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
RelatedLinksList.xslt
The RelatedLinksList.xslt file looks at the homepage primary navigation tab for its nodes to display in the menu.
Please excuse my poor xslt BUT I can't seem to figure how this is linked in.
Is it looking at the template name or document type. The top level document is called Home with a Homepage doc type and template.
I would be interested how you pass the values from the primary navigation variable.
I currently get nothing which means that I don't think the script is wired to look at the home page properly.
My templates and doc type are called PageHome. Is this the problem?
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="rootPage" select="$currentPage/ancestor-or-self::root"/>
<xsl:variable name="propertyAlias" select="/macro/PropertyAlias"/>
<xsl:template match="/">
<xsl:variable name="homepage" select="$currentPage/ancestor-or-self::Homepage"/>
<xsl:variable name="nodeIds" select="umbraco.library:Split($homepage/*[name()=$propertyAlias],',')" />
<ul class="navigation fc">
<xsl:for-each select="$nodeIds/value">
<xsl:variable name="linkNone" select="$rootPage//*[@isDoc][@id = string(current()/.)]"/>
<xsl:if test="string-length($linkNone/@id)> 0">
<li>
<xsl:attribute name="class">
<xsl:if test="$currentPage/ancestor-or-self::*[@level > 1]/@id = $linkNone/@id">
<xsl:text>selected</xsl:text>
</xsl:if>
<xsl:if test="position() = last()">
<xsl:text> last</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($linkNone/umbracoUrlAlias) > 0">
<a href="{$linkNone/umbracoUrlAlias}">
<xsl:value-of select="$linkNone/@nodeName"/>
</a>
</xsl:when>
<xsl:otherwise>
<a href="{umbraco.library:NiceUrl($linkNone/@id)}">
<xsl:value-of select="$linkNone/@nodeName"/>
</a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template>
I have figured it out. Need to change the Homepage syntax to PageHome which is my doc type/template
is working on a reply...