Copied to clipboard

Flag this post as spam?

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


  • Streety 358 posts 568 karma points
    Jul 20, 2011 @ 11:10
    Streety
    0

    What NAV xslt are you using for the demo?

    I am trying to create a xslt script that just shows the products node. I can't seem to figure the variables in the script. DO you have any notes or documentation?

     

    For instance the macro you use for the menu is like this:

    <umbraco:Macro fromLevel="3" navigationId="mainmenu" numberOfLevels="1" rootPage="" showOnlyCurrentPath="1" useSelfAsRoot="0" isSitemap="0" Alias="Navigation" runat="server"></umbraco:Macro>

     

    But If I do something like this:

    <umbraco:Macro fromLevel="4" navigationId="mainmenu" numberOfLevels="1" rootPage="Products" showOnlyCurrentPath="1" useSelfAsRoot="0" isSitemap="0" Alias="Navigation" runat="server"></umbraco:Macro>

    I get nothing returned. Any ideas?

  • Rune Grønkjær 1372 posts 3103 karma points
    Jul 20, 2011 @ 11:17
    Rune Grønkjær
    0

    Hi Streety,

    Theres no official documentation on our navigation.xslt. What you're doing is allmost right.

    The "rootPage" parameter is supposed to be an ID of the page to use as root of the menu. So you could just hardcode it to the Products page's ID.

    Next is the "fromLevel" parameter. When using a "rootPage" or "useSelfAsRoot" the number in the "fromLevel" parameter should be relative to that node. So if I'm not much mistaken "fromLevel" should be 1.

    "numberOfLevels" can be left out if you want all levels written. Or you can set it to a fixed number.

    "showOnlyCurrentPath" is usually 1. That means that the menu will only "open up" childelements when you are on the parent element.

    Hope that helps a bit.

    /Rune

  • Streety 358 posts 568 karma points
    Jul 20, 2011 @ 11:51
    Streety
    0

    Thanks Rune.

    That got it

  • Rune Grønkjær 1372 posts 3103 karma points
    Jul 20, 2011 @ 11:52
    Rune Grønkjær
    0

    No problem. It's quite helpfull if you know how to use it.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft