Big problem with navigation on multilingual site - strange redirection happening
Hi,
I've got a site that was initially just in English but is now German as well. The DE part is yet to go live but the UK is still running.
Previously the structure for the site was:
Content
Home
product
solution
help
Now it's:
Content
Home
product
solution
help
Haus
German product
German solution
German help
Obviously the only difference is the addition of the German node which was cloned from UK Home. I'm using hostname redirection and that is working okey dokey, however not 100%.
What is happening now is that the top menu nav is being generated via XSLT (see code below) and when the user clicks upon the link, some strange redirection is happening so instead of seeing:
However, if you type in http://www.site.com/product, you do go to the correct page and it all renders fine, just gets redirected and adds the /home to the url - WHY?
Menu code:
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <!-- Add the class selected if the currentpage or parent nodes (up the tree to the root) ID matches our current node ID in the for each loop--> <xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id"> <xsl:attribute name="class"> <xsl:text>selected</xsl:text> </xsl:attribute> </xsl:if> <a> <xsl:attribute name="href"> /<xsl:value-of select="@urlName" /> </xsl:attribute> <xsl:value-of select="@nodeName" /> </a> <!-- this does the same, commented out so you can see both approaches <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName" /> </a>--> </li> </xsl:for-each>
Can anyone suggest what is going on here and how I can resolve it?
Big problem with navigation on multilingual site - strange redirection happening
Hi,
I've got a site that was initially just in English but is now German as well. The DE part is yet to go live but the UK is still running.
Previously the structure for the site was:
Content
Home
product
solution
help
Now it's:
Content
Home
product
solution
help
Haus
German product
German solution
German help
Obviously the only difference is the addition of the German node which was cloned from UK Home. I'm using hostname redirection and that is working okey dokey, however not 100%.
What is happening now is that the top menu nav is being generated via XSLT (see code below) and when the user clicks upon the link, some strange redirection is happening so instead of seeing:
http://www.site.com/product they are getting redirected to http://www.site.com/home/product which is messing things up.
However, if you type in http://www.site.com/product, you do go to the correct page and it all renders fine, just gets redirected and adds the /home to the url - WHY?
Menu code:
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<!-- Add the class selected if the currentpage or parent nodes (up the tree to the root) ID matches our current node ID in the for each loop-->
<xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id">
<xsl:attribute name="class">
<xsl:text>selected</xsl:text>
</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="href">
/<xsl:value-of select="@urlName" />
</xsl:attribute>
<xsl:value-of select="@nodeName" />
</a>
<!-- this does the same, commented out so you can see both approaches
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName" />
</a>-->
</li>
</xsl:for-each>
Can anyone suggest what is going on here and how I can resolve it?
Cheers
Si
Anyone?
Do you have the appSetting umbracoHideTopLevelNodeFromPath in the web.config set to true?
Spot on - It was set to false, now i've set to true it's now working, thanks big time Berto :-)
Glad i could help ;)
is working on a reply...