logo

Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Theming the main menu

22/02/2025, by Anonymous (not verified)
Forums

Good day everyone))

As a newcomer, I've encountered a somewhat insurmountable task.

I want to style the menu as shown in the picture.

      <nav>
        <ul class="sf-menu" id="nav">
          <li class="selected"></li>

            ....
          <li>
            <ul>
              <li>

                   ....
                <ul>
                  <li><a href="#">Sub Drop Down One</a></li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </nav>

 

The standard output in page.tpl does not display nested lists. (((

 

<?php print theme('links__system_main_menu', array(
          'links' => $main_menu,
          'attributes' => array(
            'id' => 'nav',
            'class' => array('links', 'clearfix', 'sf-menu'),
          ),
          'heading' => array(
            'text' => t('Main menu'),
            'level' => 'h2',
            'class' => array('element-invisible'),
          ),
        )); ?>

 

I can't get the tree output to look like it does in the template.(((

    <?php print render(menu_tree('main-menu')); ?>

 

Help!