Copied to clipboard

Flag this post as spam?

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


  • pnr 131 posts 226 karma points
    Apr 29, 2011 @ 13:10
    pnr
    0

    Need a menu only with links on the last nodes

    I need a menu that only links on the last nodes. all other menu items shall only expand with som java script.

     

    Menu
    - submenu
    - subsubmenu (with link)
    - submenu 2
    - subsubmenu 1 (with link)

     

    Thanks very much in advance!

  • david 46 posts 81 karma points
    Apr 29, 2011 @ 13:21
    david
    1

    something like this?

    <xsl:variable name="hasChildren" select="umbraco.library:GetXmlNodeById(@id)/* [@isDoc]"/>
    <xsl:if test="count($hasChildren) = 0">
    <!-- create the link -->
    </xsl:if>

  • praveity 100 posts 125 karma points
    May 01, 2011 @ 15:09
    praveity
    1

    you can loop through all the sub menu item as:

    <xsl:for-each select="$currentPage//*">
    <xsl:if test="position() = last()">
    <!-- make a link -->
    </xsl:if>
    </xsl:for-each>
  • pnr 131 posts 226 karma points
    May 02, 2011 @ 10:19
    pnr
    0

    Thanks very much for your replies!

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    May 02, 2011 @ 10:42
    Kim Andersen
    0

    Hi pnr

    If you are using the solution from praveity, be sure to include the [@isDoc] in the nodes you are running through to make sure you are only running through actual nodes. Otherwise you'll also run through all of the document properties.

    Just a small note :)

    /Kim A

  • praveity 100 posts 125 karma points
    May 04, 2011 @ 06:15
    praveity
    0

    Kim, 

    Thanks for the advice. Its so true of you.

Please Sign in or register to post replies

Write your reply to:

Draft