Hi, first of all I'd like to thank Sean Fulton for is reply, I didn't follow your solution because I was away for the weekend and failed to read my email and when I did I've had already reached two solutions for my problem. I'm not sure if the first one is a very correct way to implement this, but I'll leave it here for possible future use. All changes are to be performed in the file lenya/pubs/"mypub"/lenya/xslt/navigation/menu.xsl:

(1) projects <- menuitem-selected, shows only the direct child nodes
      >> former
      >> undergoing

   <xsl:when test="parent::nav:[EMAIL PROTECTED] = 'true']">
      <xsl:call-template name="item"/>
   </xsl:when>


(2) projects
      >> former
>> undergoing <- menuitem-selected, shows direct child nodes and preceding and following siblings
         >> u1
         >> u2
         >> ...

<xsl:when test="(preceding-sibling::nav:[EMAIL PROTECTED] = 'true']) or (following-sibling::nav:[EMAIL PROTECTED] = 'true'])">
      <xsl:call-template name="item"/>
   </xsl:when>


(3) projects
      >> former
>> f1 <- menuitem-selected, shows direct child nodes and parent's preceding and following siblings
          >> f2
          >> ...
      >> undergoing

<xsl:when test="(preceding-sibling::nav:node/descendant::nav:[EMAIL PROTECTED] = 'true']) or (following-sibling::nav:node/descendant::nav:[EMAIL PROTECTED] = 'true'])">
      <xsl:call-template name="item"/>
   </xsl:when>


After this I've found a much easier way to get the desired behavior, which was reached by commenting a single line in the same file; in the the default publication, Lenya expands every level of the selected item, while this way it will expand only one level at a time:

   <xsl:otherwise>
     <div id="menublock-{count(ancestor-or-self::nav:node)}">
       <xsl:call-template name="item"/>
<!-- <xsl:apply-templates select="nav:node"/> --> COMMENT THIS LINE
     </div>
   </xsl:otherwise>


Regards,
Rolando

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to