Hallo I'm new here and not a coder so exuse me for this silly question:
ok i have a main menu made with a Menu prototype that work ok then i got a sidebar with 4 sub menus, this munus should list sub pages of some main pages :)
I'have merged 2 scripts so probably it will be some mess but it works
<!-- The fun starts here --> <ul> <xsl:variable name="myTopic" select="umbraco.library:GetXmlNodeById('1099')" />
<xsl:for-each select="$myTopic/node">
<li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id"> <!-- we're under the item - you can do your own styling here --> <xsl:attribute name="style">font-weight: bold;</xsl:attribute> </xsl:if> <xsl:value-of select="@nodeName"/> </a> </li>
sub menu problem
Hallo I'm new here and not a coder so exuse me for this silly question:
ok i have a main menu made with a Menu prototype that work ok then i got a sidebar with 4 sub menus, this munus should list sub pages of some main pages :)
sidebar:
topic1
subpage_topic1_A
subpage_topic1_B
subpage_topic1_C
subpage_topic1_D
topic2
subpage_topic2_A
subpage_topic2_B
subpage_topic2_C
subpage_topic2_D
topic3
subpage_topic3_A
subpage_topic3_B
subpage_topic3_C
subpage_topic3_D
ok topic1,topic2 and topic3 are main pages
what i need is to have in all the pages of the site the sidebar with all the links.
I need to create a macro tha renders in all the pages those menus
I think it should be a costant id for the main pages and a loop that pops the sub pages but I don't know how to to this!! please help me!!
ps. sorry 4 my english!!
Ale
solved!
I'have merged 2 scripts so probably it will be some mess but it works
<!-- The fun starts here -->
<ul>
<xsl:variable name="myTopic" select="umbraco.library:GetXmlNodeById('1099')" />
<xsl:for-each select="$myTopic/node">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<!-- we're under the item - you can do your own styling here -->
<xsl:attribute name="style">font-weight: bold;</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
is working on a reply...