Copied to clipboard

Flag this post as spam?

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


  • Luke Johnson 61 posts 80 karma points
    Jun 27, 2011 @ 18:20
    Luke Johnson
    0

    Limit number of items returned in "List Sub Pages from a Changeable Source"

    I am using mega menus as my website's main navigation. I am loading 2nd level navigation into the mega menus with an xslt, "List Sub Pages from a Changeable Source". The xslt works just fine, but I am looking for a way to limit the number of items displayed so that the links do not run outside of the mega menu's boundaries.

    The mega menu's height allows for 8 links to each column. I have a high number of 2nd level links (sometimes up to 30), so the xlst causes the list to run outside of the mega menu.

    Is there a way to display segments of the xlst list?

    • 1st-8th links
    • 9th-16th links
    • 17th-24th, etc...

    The links in the image below are hard-coded, not called by xslt. If all of these links appeared in the same xslt list, they would obviously exceed the height of the mega menu.

    Any help you can provide would be greatly appreciated!

  • Bas Schouten 135 posts 233 karma points
    Jun 28, 2011 @ 08:24
    Bas Schouten
    0

    Hi Luke,

    You could use something like: <xsl:if test="position() mod 8 = 0 or position() = last()">

    Reading this post could help you:

    http://our.umbraco.org/forum/developers/xslt/2522-Multi-column-navigation

    Cheers,

    Bas

  • Luke Johnson 61 posts 80 karma points
    Jul 04, 2011 @ 20:38
    Luke Johnson
    0

    Thanks, Bas! That link did the trick for me. Works great!

Please Sign in or register to post replies

Write your reply to:

Draft