Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • shine 43 posts 83 karma points
    May 17, 2013 @ 13:08
    shine
    0

    problem in xslt menu display

    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 &lt;= 7 ]) &gt; 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 &lt;= 7 ]) &gt; 0">   
       <!-- <div class='wsite-menu-wrap' style='display:none'>-->
                 <ul class="wsite-menu" >
                    <xsl:for-each select="child::* [string(umbracoNaviHide) != '1' and @level &lt;= 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>

     

  • Charles Afford 1163 posts 1709 karma points
    May 18, 2013 @ 21:49
    Charles Afford
    0

    Hi, think this could be in the wrong place.  This need to be in the xslt forum :).  Could you explain what is wrong?

    What is currently happening and what is currently rendering

    What you would like to happend and what you would like to render

  • shine 43 posts 83 karma points
    May 20, 2013 @ 07:13
    shine
    0

    My xslt problem is that my submenu not display

Please Sign in or register to post replies

Write your reply to:

Draft