Monday, 15 February 2010

asp.net - Navigation menu in umbraco -



asp.net - Navigation menu in umbraco -

i using umbraco cms. here have problem in navigation menu multilingual site. xslt files code given below. renders menu in english. new umbraco. can 1 please tell me have alter in code create work right according different languages. code is

<?xml version="1.0" encoding="utf-8"?> <!doctype xsl:stylesheet [ <!entity nbsp "&#x00a0;"> ]> <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" xmlns:exslt.exsltcommon="urn:exslt.exsltcommon" xmlns:exslt.exsltdatesandtimes="urn:exslt.exsltdatesandtimes" xmlns:exslt.exsltmath="urn:exslt.exsltmath" xmlns:exslt.exsltregularexpressions="urn:exslt.exsltregularexpressions" xmlns:exslt.exsltstrings="urn:exslt.exsltstrings" xmlns:exslt.exsltsets="urn:exslt.exsltsets" exclude-result-prefixes="msxml umbraco.library exslt.exsltcommon exslt.exsltdatesandtimes exslt.exsltmath exslt.exsltregularexpressions exslt.exsltstrings exslt.exsltsets "> <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="siteroot" select="$currentpage/ancestor-or-self::*[@level = 1]" /> <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 &gt; 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:if test="position() != last()"> <xsl:text> | </xsl:text> </xsl:if> </xsl:when> <xsl:otherwise> <a href="{umbraco.library:niceurl($linknone/@id)}"> <xsl:value-of select="$linknone/@nodename"/> </a> <xsl:if test="position() != last()"> <xsl:text> | </xsl:text> </xsl:if> </xsl:otherwise> </xsl:choose> </li> </xsl:if> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet>​

you shouldn't using $rootpage ever. multilingual or multisite want stop @ home page above current content ($siteroot).

it looks navigation selected picker on home page. reason why don't allow content tree construction determine navigation? may simpler in case.

if doesn't help, please post content tree construction example.

asp.net xslt content-management-system umbraco

No comments:

Post a Comment