custom autonav template
Permalink 1 user found helpful
Hi I hav a static site that needs to be converted to c5. Simple job :).
Only problem I am having is to create a autonav template to my needs. My static structure looks like this :
So simply created a new template under the blocks folder and changed the view.php.
Now all links are enclosed in a div.
What I need is that only the links on the top level are enclosed in a div and all sub menu links are not.
Thx for ur help.
Only problem I am having is to create a autonav template to my needs. My static structure looks like this :
<ul id="mainnav"> <li> <div class="menu"><a href="inhalt/unternehmen/unternehmen.html">Unternehmen</a></div> </li> <li> <div class="menu"><a href="inhalt/produkte/produkte.html">Produkte</a></div> </li> <li> <div class="menu"><a href="inhalt/service/pruefservice.html">Service</a></div> <ul> <li style="margin-top: 10px;"><a href="inhalt/service/produktkatalog.html">Produktkatalog</a></li> <li><a href="inhalt/service/pruefservice.html">Prüfservice</a></li> <li><a href="inhalt/service/seminare.html">Seminare</a></li> <li style="margin: 0;"> </li> </ul>
Viewing 15 lines of 36 lines. View entire code block.
So simply created a new template under the blocks folder and changed the view.php.
Now all links are enclosed in a div.
What I need is that only the links on the top level are enclosed in a div and all sub menu links are not.
Thx for ur help.
If you use that template, then if you look at the end of foreach loop at the end of teh file, judicious use of $ni->hasSubmenu() and $ni->subDepth() ought to get you what you want