Drupal menu with submenus only shows submenu of current page. NOT a CSS problem

Posted by jordanstephens on Stack Overflow See other posts from Stack Overflow or by jordanstephens
Published on 2010-05-14T21:13:27Z Indexed on 2010/05/14 22:24 UTC
Read the original article Hit count: 211

Filed under:
|
|
|

This is not a CSS problem. The HTML isn't there. I need the menu, with submenus to exist in HTML on EACH page. Right now, the submenu only exists in HTML for the submenu related to the page being currently viewed. Here's an example of what it SHOULD be like.

<ul id="menu">
    <li>Page1
        <ul class="sub">
            <li>sub1.1</li>
            <li>sub1.2</li>
            <li>sub1.3</li>
            <li>sub1.4</li>
        </ul>
    </li>
    <li>Page2
        <ul class="sub">
            <li>sub2.1</li>
            <li>sub2.2</li>
            <li>sub2.3</li>
            <li>sub2.4</li>
        </ul>
    </li>
    <li>Page3
        <ul class="sub">
            <li>sub3.1</li>
            <li>sub3.2</li>
            <li>sub3.3</li>
            <li>sub3.4</li>
        </ul>
    </li>
</ul>

But here is what is actually happening (say I'm currently viewing Page2):

<ul id="menu">
    <li>Page1</li>
    <li>Page2
        <ul class="sub">
            <li>sub2.1</li>
            <li>sub2.2</li>
            <li>sub2.3</li>
            <li>sub2.4</li>
        </ul>
    </li>
    <li>Page3</li>
</ul>

Additionally, and maybe this doesn't have anything to do with it, but whichever list item <li> element is relative to the page i am currently on is given these classes expanded active-trail and any other <li> is given collapsed class.

The classes aren't really so much of an issue, the problem is just that the content (html) isn't there.

Does anyone have any idea what's going on here. I feel like I've been digging in the Drupal Admin menus forever now. I feel like it's got to have a PHP solution in the template file or something, but I don't know Drupal super well at this point.

Thank you!

© Stack Overflow or respective owner

Related posts about drupal

Related posts about php