Another newbie question: I'm using the basic Starter Kit - I want to create a dropdown menu - I have all the css, etc in place, however, I'm unfamiliar with xslt. I want to merge the umb2ndLevelNavigation.xslt and umbTopNavigation.xslt so I get:
Top Level
• Second Level
• Second Level
Etc.
I hope that makes sense - any help will be appreciated.
What I want to achieve is for the 2nd level nav to appear when the top level is rolled over. I imagine you need to copy something out of the 2nd level xlst file and add this to the top level.
Thanks Rich. I think I'm making this more complicated than I need to - if I insert the top and second level macros into the template it renders both, however the second level only appears when the top level is selected - is there an easy way of getting the second level to display when the top is rolled over?
This looks interesting - not sure where to begin though. I've installed the Cultive Razor Examples - where do I attach the code as indicated on the other post?
@helper traverse(dynamic node){ var maxLevelForSitemap =4;
var values =newDictionary<string,object>(); values.Add("maxLevelForSitemap", maxLevelForSitemap);
Starterkit Multi Level Nav
Hi,
Another newbie question: I'm using the basic Starter Kit - I want to create a dropdown menu - I have all the css, etc in place, however, I'm unfamiliar with xslt. I want to merge the umb2ndLevelNavigation.xslt and umbTopNavigation.xslt so I get:
Top Level
• Second Level
• Second Level
Etc.
I hope that makes sense - any help will be appreciated.
Darren
Hi Darren,
It might be worth posting the snippet of html you're trying to replicate.
Rich
Hi Rich,
What I want to achieve is for the 2nd level nav to appear when the top level is rolled over. I imagine you need to copy something out of the 2nd level xlst file and add this to the top level.
Cheers
Darren
I've trawled through the forum tonight looking for some pointers - some posts seem to recommend sitemap.xlst - is this an option?
The effect I'm trying to achieve is here : http://www.shaw-online.com/client/big1/
I'm learning as I'm going here - so please bear with me.
Thanks for all your help.
Darren
Hi Darren,
I would try the sitemap.xslt as you say, basically from looking at the html the nav needs the first level and then the second level.
Plug the sitemap.xslt in and then change the variable to restrict it to 2 levels.
Let us know how you get on.
Rich
Hi Rich,
Thanks for this, I'll give it a try later - do I need to change the variable in the sitemap.xlst or umbTopNavigation.xslt?
Darren
Hey Darren,
You only need one XSLT file for your nav, you can base this on sitemap.xslt
Rich
Thanks Rich. I think I'm making this more complicated than I need to - if I insert the top and second level macros into the template it renders both, however the second level only appears when the top level is selected - is there an easy way of getting the second level to display when the top is rolled over?
Darren
<div class="menu" style="float:left">
<div class="nav">
<div class="table">
<ul class="select"><umbraco:Macro Alias="umbTopNavigation" runat="server" /></ul>
</div>
</div>
</div>
<div class="menu_sub" style="float:left">
<div class="nav">
<div class="table">
<ul class="select"><umbraco:Macro Alias="umb2ndLevelNavigation" runat="server" /></ul>
</div>
Hey Darren,
Have a look here http://our.umbraco.org/forum/developers/razor/25371-Dropdown-menu-with-different-classes-based-on-level?p=0#comment94355
I think Dennis achieved what you need.
Rich
Hi Rich,
This looks interesting - not sure where to begin though. I've installed the Cultive Razor Examples - where do I attach the code as indicated on the other post?
Thanks.DarrenHi Rich,
I've managed to solve this problem!! I used sitemap.xlst and a css menu from Stu Nicolls - worked first time!
Darren
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.