Not sure if this is bootstrap theme specific but:

When using print render($primary_nav) twice in a template file (desktop nav and mobile nav) the second output gets wrapped in
<ul class="menu nav navbar-nav secondary"> twice.

e.g.

<ul class="menu nav navbar-nav secondary">
    <ul class="menu nav navbar-nav secondary">
        <li>...</li>

When using it three times, it'll get wrapped three times.

Comments

fredklopper’s picture

+1

When rendering $secondary_nav multiple times the same thing happens.

Any solution?

Update: I think I should render it once and just print the rendered output multiple times ...

rolandoscott’s picture

yeah i'm getting the same thing on a mostly vanilla install, just installed the latest DEV version of bootstrap..

if you use render($primary_nav) or render($secondary_nav) you get a UL inside of a UL with the same classes, etc..

it makes theming a bit of a hassle.. any fixes available or any reason why this is like this?

markhalliwell’s picture

Status: Active » Closed (works as designed)
realgiucas’s picture

This is an error.
As a result the page doesn't validate ( Element “ul” not allowed as child of element “ul” [...] )

As a workaround I solved copying $primary_nav in a new variable and then rendering each of the 2 variables only once