Developer forum

Forum » Templates » Nav: expandmode:All

Nav: expandmode:All

Regin Madsen
Reply
Hi,
I am struggeling with a menu. Im using the standard LiClean.xslt and have set the following:
<ul class="dwnavigation footer-box" title="Footermenu201" id="footermen" settings="startlevel:1;endlevel:3;template:LIClean.xslt;expandmode:All> </ul>

No matter what I do, it seems like its keeping the expandmode to Path - as only the active item has displayed its subpages.

Anyone who can help me out?



Replies

 
Nicolai Høeg Pedersen
Reply
I think we need to see a template and a page structure... And how does the XML look like if you add &savexml=true (A xml file with the navigation data is saved next to the template used - LIClean.xslt.)
 
Regin Madsen
Reply
The mater template looks like this (its cut out so head and foot is missing):
  <div class="bg-content">
    <div id="header-site"> <a href="/" class="logo"></a> <a href="#" class="rapport"></a>
      <div class="top-right-menu">
        <ul title="Topmenu2011" class="dwnavigation" id="topmenu" settings="startlevel:2;endlevel:2;template:LIClean.xslt;parentid:8;expandmode:All">
        </ul>
      </div>
      <ul class="dwnavigation navigation" title="Mainmenu2011" id="mainmenu" settings="startlevel:1;endlevel:1;template:LICleanMain.xslt;explandmode:All">
      </ul>
    </div>
               <!--@ContentPlaceholder-->
    <div class="clear"></div>
    <div id="footer">
   
      <div>
       <ul class="dwnavigation navigation" title="Footermenu2011" id="footermenu" settings="startlevel:1;template:LIClean.xslt;">


LIClean like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

  <!--
  Description: ul/li based navigation. No features from admin implemented.
  Recommended settings:
  Fold out: True or False
  Upper menu: Dynamic or Static
  First level: > 0
  Last level: >= First level
  -->
 
  <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"  encoding="utf-8" />
  <xsl:param name="html-content-type" />
  <xsl:template match="/NavigationTree">
   
    <xsl:if test="count(//Page) > 0">
      <ul>
        <xsl:apply-templates select="Page">
          <xsl:with-param name="depth" select="1"/>
        </xsl:apply-templates>
      </ul>
    </xsl:if>

  </xsl:template>

  <xsl:template match="//Page">
    <xsl:param name="depth"/>
    <li>
      <a>
        <xsl:attribute name="class">
        <xsl:if test="@InPath='True'">inpath </xsl:if>
        <xsl:if test="position() = 1">firstitem </xsl:if>
        <xsl:if test="position() = count(//Page)">lastitem </xsl:if>
        <xsl:if test="@Active='True'">activeitem</xsl:if>
</xsl:attribute>
        <xsl:attribute name="href"><xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/></xsl:attribute>
        <xsl:value-of select="@MenuText" disable-output-escaping="yes"/>
      </a>
        <xsl:if test="count(Page)">
          <ul class="M{@AbsoluteLevel}">
            <xsl:apply-templates select="Page">
              <xsl:with-param name="depth" select="$depth+1"/>
            </xsl:apply-templates>
          </ul>
        </xsl:if>
    </li>
  </xsl:template>

</xsl:stylesheet>


 

You must be logged in to post in the forum