Change Source of Dropdown and pull name from field value
Hi, I have the following code i'm using for a dropdown, I can't seem to figure out how to get the name of the menu items to be pulled from the page field instead of the nodeName, i would think that "<xsl:value-of select="data [@alias = 'navigationDisplayName']"/>" would work in place of "<xsl:value-of select="@nodeName"/>" but it returns nothing. Retreiving the navigationDisplayName field works with the basic navigation prototypes though...I also can't figure out how to make the nav start at level 2 instead of the root node, is there some basic flaw in my code that I'm missing?
<!-- update this variable on how deep your site map should be --> <xsl:variable name="maxLevelForNav" select="4"/> <xsl:variable name="level" select="2"/>
As you said replacing @nodeName with ./data [@alias='navigationDisplayName'] should work. You can try outputting the XML in a textarea to make sure that property is actually there:
Change Source of Dropdown and pull name from field value
Hi, I have the following code i'm using for a dropdown, I can't seem to figure out how to get the name of the menu items to be pulled from the page field instead of the nodeName, i would think that "<xsl:value-of select="data [@alias = 'navigationDisplayName']"/>" would work in place of "<xsl:value-of select="@nodeName"/>" but it returns nothing. Retreiving the navigationDisplayName field works with the basic navigation prototypes though...I also can't figure out how to make the nav start at level 2 instead of the root node, is there some basic flaw in my code that I'm missing?
Hi,
Regarding making it start at the root, your "parent" parameter is hardcoded for level 1. Change it to read the $level variable
As you said replacing @nodeName with ./data [@alias='navigationDisplayName'] should work. You can try outputting the XML in a textarea to make sure that property is actually there:
<textarea><xsl:copy-of select="."/></textarea>
is working on a reply...