This project is read-only.

Remove overkill html in Navigation Zone

Topics: Writing themes
May 7, 2013 at 9:00 PM

I'm new to Orchard and I'm trying to create a new theme from scratch.
When I render my Navigation in my layout.cshtml
<div id="header">
I get
<div id="header">
<div class="zone zone-navigation" shape-id="8">
<article class="widget-navigation widget-menu-widget widget" shape-id="9">
<nav shape-id="10">
    <ul class="menu menu-main-menu" shape-id="10">
<li class="current last first" shape-id="13">
    <a href="/" shape-id="13">Home</a> 
This seems like a lot of unnecessary html. A simple ul with li would have done just fine I think.
Is there a way around this? What templates must I override. Can anybody give me a concreet example.

I want to achieve this:
<div id="header">
<li><a href="#">item one</a></li>
<li><a href="#">item two</a></li>
Thanks in advance,
May 7, 2013 at 9:08 PM
Content.cshtml I think.
May 8, 2013 at 3:58 PM
A bit more details would be nice Bertrand.
This isn't a very clear answer.
Which module must be overrided with what code?
May 8, 2013 at 6:07 PM
Try Menu.cshtml, MenuItem.cshtml, and MenuItemLink.cshtml. I found them in Orchard.Core > Navigation
May 16, 2013 at 3:19 PM

how can i render a navigation menu in the layout file without the need of Menu.cshtml and etc....

i want to render all the navigation menu in the layout.
can someone show me a code example?

i started to write it but i get stuck how i get the menu model from the menu widget.
here is my code:
@if (Model.Navigation != null) {
  for( int i = 0; i < Model.Navigation.Items.Count && i < 3; i++ ) {
     var menuWidget = Model.Navigation.Items[i].ContentItem;
     var lastClass = i == Model.Navigation.Items.Count-1 ? "last" : "";
     <div class="category @lastClass" >
      <!--here i need to render the menu items-->
i working on custom theme for my client
and i have in his site more then one dynamic menu
i need custom design for the header menu
and i have two more menu with custom desing in the footer

May 18, 2013 at 5:59 AM
Why? Separation of concerns is a good thing. (multiple menus seems like an orthogonal concern.)