Design and CSS styles
Version 6.x > Design and CSS styles > Dynamic Menu Transformations View modes: 
User avatar
Member
Member
shelley.ford-celero - 7/29/2012 9:42:21 PM
   
Dynamic Menu Transformations
I originally had a menu set up with 2 levels. The menus use <ul><li></li></ul>. I needed to transfer that to a Kentico site. A hierarchial transformation was created called ECU_MainNavigation. Within it there were three transformations: footer transformation (level 0) for All document types called Separator, and two item transformations of CMS.MenuItem document type. The first item transformation is called FirstLevelItem (level 0) and the second item transformation is called SecondLevelItem (level 1).
The transformation is displayed in a Hierarchial viewer web part

The HTML Evnelope before and after is <div id="mainnav">
<ul id="MenuBar1" class="MenuBarHorizontal"> and </div> respectively

The code for FirstLevelItem:
<li>
<a href="<%# GetDocumentUrl() %>" class="MenuBarItemSubmenu"><%# Eval("DocumentName") %></a>
<ul>

The code for SecondLevelItem
<li><a href="<%# GetDocumentUrl() %>"><%# Eval("DocumentName") %></a></li>

The Separator is </ul>
</li>

I now have to add a third level and am having trouble wrapping my head around what level the third item needs to be. It also needs to be added within the <li></li> tags of the second level. So it would look as follows:

<div id="mainnav">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li>
<a href="#" class="MenuBarItemSubmenu">Page Level 1</a>
<ul>
<li><a href="page.aspx">Page Level 2</a></li>
<li><a href="page.aspx">Page Level 2</a>
<ul>
<li><a href="page.aspx">Page Level 3</a></li>

</ul>
</li>
</ul>
</li>
</ul>
...
Any ideas?

User avatar
Kentico Support
Kentico Support
kentico_janh - 7/30/2012 2:06:24 AM
   
RE:Dynamic Menu Transformations
Hello,

It should be enough to add following header and footer (level 2) transformations:

Header:
<ul>


Footer:
</ul>


Best regards,
Jan Hermann