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 guys,
I'm trying to solve a problem regarding the use of Standard Wedsite project with multiple sites.
I have almost everything under control, but I was wondering if someone could give some help by now...
I am selection correctly the navigation menu in each homepage node, but my website only presents the menu for the first site.
I've set the "Manage hostnames" for each homepage node.
Probably my issue has something to do with these lines in Navigation.XSLT file:
<xsl:template match="/"> <xsl:call-template name="Navigation"> <xsl:with-param name="childNodes" select="$currentPage/ancestor-or-self::*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" /> </xsl:call-template> </xsl:template>
Here follows the full content of Navigation.xslt
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " ">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/> <xsl:variable name="CssClassName" select="/macro/CssClassName" /> <xsl:variable name="CssId" select="/macro/CssId" /> <xsl:variable name="StopLevel" select="/macro/StopLevel" /> <xsl:variable name="StartLevel" select="/macro/StartLevel" /> <xsl:template match="/"> <xsl:call-template name="Navigation"> <xsl:with-param name="childNodes" select="$currentPage/ancestor-or-self::*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" /> </xsl:call-template> </xsl:template> <xsl:template name="Navigation"> <xsl:param name="childNodes"/> <xsl:choose> <xsl:when test="count($childNodes) > 0"> <ul> <xsl:if test="$CssId !=''"> <xsl:attribute name="id"> <xsl:value-of select="$CssId" /> </xsl:attribute> </xsl:if> <xsl:if test="$CssClassName !=''"> <xsl:attribute name="class"> <xsl:value-of select="$CssClassName" /> </xsl:attribute> </xsl:if> <xsl:for-each select="$childNodes"> <xsl:call-template name="SubMenu"/> </xsl:for-each> </ul> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="SubMenu"> <xsl:if test="(umbraco.library:IsProtected(current()/@id, current()/@path) = false() or (umbraco.library:HasAccess(current()/@id, current()/@path) = true() ))"> <li> <xsl:attribute name="class"> <xsl:if test="$currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id"> <xsl:text>selected </xsl:text> </xsl:if> <xsl:if test="position() = 1"> <xsl:text>first </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(data[@alias='RedirectUrl']) > 0"> <a href="{data[@alias='RedirectUrl']}" title="{@nodeName}"> <xsl:value-of select="@nodeName"/> </a> </xsl:when> <xsl:when test="string-length(data[@alias='RedirectPageId']) > 0"> <a href="{umbraco.library:NiceUrl(data[@alias='RedirectPageId'])}" title="{@nodeName}"> <xsl:value-of select="@nodeName"/> </a> </xsl:when> <xsl:otherwise> <a href="{umbraco.library:NiceUrl(@id)}" title="{@nodeName}"> <xsl:value-of select="@nodeName"/> </a> </xsl:otherwise> </xsl:choose> <xsl:if test="current()/@level < ($StopLevel) and $currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id"> <xsl:if test="count(*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]) > 0"> <ul> <xsl:for-each select="*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]"> <xsl:sort select="@sortOrder" data-type="number" /> <xsl:call-template name="SubMenu"/> </xsl:for-each> </ul> </xsl:if> </xsl:if> </li> </xsl:if> </xsl:template></xsl:stylesheet>
Thanks in advance!
Rapha
Hi there, I found out the problem, it was in RelatedLinksList.xslt .
It sets the root page as root, and force to understand the home page as some homepage document name as homepage.
I fixed it seting both to level 1.
I strongly suggest to treat that as a bug and include this change to next versions.
Hope to help other with the same problem.
regards,
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Navigation with multiple sites
Hi guys,
I'm trying to solve a problem regarding the use of Standard Wedsite project with multiple sites.
I have almost everything under control, but I was wondering if someone could give some help by now...
I am selection correctly the navigation menu in each homepage node, but my website only presents the menu for the first site.
I've set the "Manage hostnames" for each homepage node.
Probably my issue has something to do with these lines in Navigation.XSLT file:
<xsl:template match="/">
<xsl:call-template name="Navigation">
<xsl:with-param name="childNodes" select="$currentPage/ancestor-or-self::*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" />
</xsl:call-template>
</xsl:template>
Here follows the full content of Navigation.xslt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="CssClassName" select="/macro/CssClassName" />
<xsl:variable name="CssId" select="/macro/CssId" />
<xsl:variable name="StopLevel" select="/macro/StopLevel" />
<xsl:variable name="StartLevel" select="/macro/StartLevel" />
<xsl:template match="/">
<xsl:call-template name="Navigation">
<xsl:with-param name="childNodes" select="$currentPage/ancestor-or-self::*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" />
</xsl:call-template>
</xsl:template>
<xsl:template name="Navigation">
<xsl:param name="childNodes"/>
<xsl:choose>
<xsl:when test="count($childNodes) > 0">
<ul>
<xsl:if test="$CssId !=''">
<xsl:attribute name="id">
<xsl:value-of select="$CssId" />
</xsl:attribute>
</xsl:if>
<xsl:if test="$CssClassName !=''">
<xsl:attribute name="class">
<xsl:value-of select="$CssClassName" />
</xsl:attribute>
</xsl:if>
<xsl:for-each select="$childNodes">
<xsl:call-template name="SubMenu"/>
</xsl:for-each>
</ul>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="SubMenu">
<xsl:if test="(umbraco.library:IsProtected(current()/@id, current()/@path) = false() or (umbraco.library:HasAccess(current()/@id, current()/@path) = true() ))">
<li>
<xsl:attribute name="class">
<xsl:if test="$currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id">
<xsl:text>selected </xsl:text>
</xsl:if>
<xsl:if test="position() = 1">
<xsl:text>first </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(data[@alias='RedirectUrl']) > 0">
<a href="{data[@alias='RedirectUrl']}" title="{@nodeName}">
<xsl:value-of select="@nodeName"/>
</a>
</xsl:when>
<xsl:when test="string-length(data[@alias='RedirectPageId']) > 0">
<a href="{umbraco.library:NiceUrl(data[@alias='RedirectPageId'])}" title="{@nodeName}">
<xsl:value-of select="@nodeName"/>
</a>
</xsl:when>
<xsl:otherwise>
<a href="{umbraco.library:NiceUrl(@id)}" title="{@nodeName}">
<xsl:value-of select="@nodeName"/>
</a>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="current()/@level < ($StopLevel) and $currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id">
<xsl:if test="count(*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]) > 0">
<ul>
<xsl:for-each select="*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]">
<xsl:sort select="@sortOrder" data-type="number" />
<xsl:call-template name="SubMenu"/>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:if>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Thanks in advance!
Rapha
Hi there, I found out the problem, it was in RelatedLinksList.xslt .
It sets the root page as root, and force to understand the home page as some homepage document name as homepage.
I fixed it seting both to level 1.
I strongly suggest to treat that as a bug and include this change to next versions.
Hope to help other with the same problem.
regards,
Rapha
is working on a reply...