We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32963
    • 1,732 Posts

    I’m thinking that we could use <ul>s to structure the manager menus:

    <ul>
    <li>Main1</li>
    <ul>
    <li>item1</li>
    <li>item2</li>
    </ul>
    </ul>

    <ul>
    <li>Main2</li>
    <ul>
    <li>item1</li>
    <li>item2</li>
    </ul>
    </ul>

    The core menus will be stored inside the database using the structure:

    id, name, action, parentid

    A menu file (cms.menus.php) could be generated and stored inside the assets/cache folder to prevent reading data from database. cache file can be regenerated when a new module or resource is installed.

    On-the-fly menus could return their values based on the OnMenuItemPreRender event. On-the-fly menus will not be cached.
      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 25663 MODX Staff
      • 12,272 Posts
      Perfect Raymond! Only we need to slightly restructure the code a bit. A fully/true nested menu should be done as follows and would make for really robust styling via CSS:

      <ul id="managerMenu">
      
      <li class="category">Main1
         <ul>
            <li>item1</li>
            <li>item2</li>
         </ul>
      </li>
      
      <li class="category">Main2
         <ul>
            <li>item1</li>
            <li>item2</li>
         </ul>
      </li>
      
      </ul>
      


      We could even use some of the same logic for menu building as is in the DropMenu snippet... um.. plugin.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32963
        • 1,732 Posts
        ok,

        remember that manager class names and ids should use a prefix (e.g. cms_)
          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 25663 MODX Staff
          • 12,272 Posts
          Cool... and I like "cms_", too. smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me