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
here is my css menu which i wnat to convert in xslt but problem is that the sub menu not display
here is my css menu
<div id="navigation"> <ul><li id='active'> <a href='/index.html'>Home</a></li> <li id='pg916406283472444280'> <a href='/about-us.html'>About Us</a> <div class='wsite-menu-wrap' style='display:none'> <ul class='wsite-menu'> <li id='wsite-nav-863485395226581217'> <a href='/southeast-greenway-campaign-summary.html'> <span class='wsite-menu-title'>Southeast Greenway Campaign Summary</span></a></li> <li id='wsite-nav-611646911499402343'><a href='/faqs.html'> <span class='wsite-menu-title'>FAQs</span></a></li></ul></div>
</div>
here is my xslt code
<xsl:output method="html" omit-xml-declaration="yes"/><xsl:param name="currentPage"/><xsl:template match="/"><!-- start writing XSLT --> <!--<div class='wsite-menu-wrap' style='display:none'>--> <ul > <xsl:for-each select="$currentPage/ancestor-or-self::*/* [string(umbracoNaviHide) != '1' and @level = 2 ]"> <li > <span class="wsite-menu-title"> <xsl:if test="$currentPage/@id=@id or ($currentPage/@parentID=@id) or ($currentPage/parent::*/@parentID=@id)"> <xsl:attribute name="class">wsite-menu-wrap</xsl:attribute> </xsl:if> <strong> <a> <xsl:attribute name="href"><xsl:value-of select="umbraco.library:NiceUrl(@id)"/></xsl:attribute> <xsl:value-of select="@nodeName" /> </a> </strong> <!-- <xsl:if test="count(child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]) > 0"> <div class="navigation" style=""> <xsl:call-template name="Subchild"> </xsl:call-template> </div> </xsl:if>--> </span> </li> </xsl:for-each></ul> <!--</div>--> </xsl:template> <xsl:template name="Subchild"> <xsl:if test="count(child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]) > 0"> <!-- <div class='wsite-menu-wrap' style='display:none'>--> <ul class="wsite-menu" > <xsl:for-each select="child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]"> <li > <span class="wsite-menu-title"> <xsl:if test="$currentPage/@id=@id or ($currentPage/@parentID=@id) or ($currentPage/parent::*/@parentID=@id)"> <xsl:attribute name="class">wsite-menu-wrap</xsl:attribute> </xsl:if> <a> <xsl:attribute name="href"> <xsl:value-of select="umbraco.library:NiceUrl(@id)"/> </xsl:attribute> <xsl:value-of select="@nodeName"/> </a> <xsl:call-template name="Subchild"> </xsl:call-template> </span> </li> </xsl:for-each> </ul> <!-- </div>--> </xsl:if></xsl:template></xsl:stylesheet>
Hi,
Can you show us the structure of your content section and how do you want your menu and submenu to display ?
//fuji
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Submenu not dispaly in my xslt
here is my css menu which i wnat to convert in xslt but problem is that the sub menu not display
here is my css menu
<div id="navigation">
<ul><li id='active'>
<a href='/index.html'>Home</a></li>
<li id='pg916406283472444280'>
<a href='/about-us.html'>About Us</a>
<div class='wsite-menu-wrap' style='display:none'>
<ul class='wsite-menu'>
<li id='wsite-nav-863485395226581217'>
<a href='/southeast-greenway-campaign-summary.html'>
<span class='wsite-menu-title'>Southeast Greenway Campaign Summary</span></a></li>
<li id='wsite-nav-611646911499402343'><a href='/faqs.html'>
<span class='wsite-menu-title'>FAQs</span></a></li></ul></div>
</div>
here is my xslt code
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<!--<div class='wsite-menu-wrap' style='display:none'>-->
<ul >
<xsl:for-each select="$currentPage/ancestor-or-self::*/* [string(umbracoNaviHide) != '1' and @level = 2 ]">
<li >
<span class="wsite-menu-title">
<xsl:if test="$currentPage/@id=@id or ($currentPage/@parentID=@id) or ($currentPage/parent::*/@parentID=@id)">
<xsl:attribute name="class">wsite-menu-wrap</xsl:attribute>
</xsl:if>
<strong>
<a>
<xsl:attribute name="href"><xsl:value-of select="umbraco.library:NiceUrl(@id)"/></xsl:attribute>
<xsl:value-of select="@nodeName" />
</a>
</strong>
<!-- <xsl:if test="count(child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]) > 0">
<div class="navigation" style="">
<xsl:call-template name="Subchild">
</xsl:call-template>
</div>
</xsl:if>-->
</span>
</li>
</xsl:for-each>
</ul>
<!--</div>-->
</xsl:template>
<xsl:template name="Subchild">
<xsl:if test="count(child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]) > 0">
<!-- <div class='wsite-menu-wrap' style='display:none'>-->
<ul class="wsite-menu" >
<xsl:for-each select="child::* [string(umbracoNaviHide) != '1' and @level <= 7 ]">
<li >
<span class="wsite-menu-title">
<xsl:if test="$currentPage/@id=@id or ($currentPage/@parentID=@id) or ($currentPage/parent::*/@parentID=@id)">
<xsl:attribute name="class">wsite-menu-wrap</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:value-of select="umbraco.library:NiceUrl(@id)"/>
</xsl:attribute>
<xsl:value-of select="@nodeName"/>
</a>
<xsl:call-template name="Subchild">
</xsl:call-template>
</span>
</li>
</xsl:for-each>
</ul>
<!-- </div>-->
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Hi,
Can you show us the structure of your content section and how do you want your menu and submenu to display ?
//fuji
is working on a reply...