Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Number of level

Home Forums Older releases 1.0.x Number of level

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3397
    oitsuki
    Participant

    Hello,
    I have 4 level in my menu, with the same script on all level, 3 works, but the number 4 does’nt want to work and block the menu on the 1st level.
    How to resolve that ?
    Below th example
    Tk

    
    <li><a><span class="sub-arrow">+</span> Design</a>
        <ul id="sm-14799623653395273-40" role="group" aria-hidden="true" aria-labelledby="sm-14799623653395273-39" aria-expanded="false">
            <li class="sub_menu_1st_level"><a><span class="sub-arrow">+</span> Design Configuration</a>
                <ul id="sm-14799623653395273-42" role="group" aria-hidden="true" aria-labelledby="sm-14799623653395273-41" aria-expanded="false">
                    <li><a href="configuration.php?gID=43"> Configuration</a>
                    </li>
                    <li><a href="configuration.php?gID=4"> Images management</a>
                    </li>
                </ul>
            </li>
            <li class="sub_menu_1st_level"><a><span class="sub-arrow">+</span> Products listing</a>
                <ul id="sm-14799623653395273-44" role="group" aria-hidden="true" aria-labelledby="sm-14799623653395273-43" aria-expanded="false">
                    <li><a href="modules.php?set=modules_products_new"> News</a>
                    </li>
                    <li><a href="modules.php?set=modules_products_heart"> Favorites</a>
                    </li>
                    <li><a href="modules_products_featured"> Featured</a>
                    </li>
                    <li><a href="modules.php?set=modules_products_special"> Specials</a>
                    </li>
                    <li><a href="modules.php?set=modules_products_search"> Search</a>
                    </li>
                    <li><a href=""> Listing</a>
                    </li>
                    <ul>
                        <li><a href="modules.php?set=modules_products_listing"> Product Listing</a>
                        </li>
                        <li><a href="configuration.php?gID=8"> Order display</a>
                        </li>
                    </ul>
                </ul>
            </li>
        </ul>
    </li>
    
    #3398
    oitsuki
    Participant

    the pb start here after listing

    
                    <ul>
                        <li><a href="modules.php?set=modules_products_listing"> Product Listing</a>
                        </li>
                        <li><a href="configuration.php?gID=8"> Order display</a>
                        </li>
                    </ul>
    
    #3399
    admin
    Keymaster

    You’ve copied the source from some kind of dev tools, as far as I can see, so I can’t be 100% sure what your original source looks like but here is an issue nonetheless – the <ul> element is not properly nested here:

                    <li><a href=""> Listing</a>
                    </li>
                    <ul>
                        <li><a href="modules.php?set=modules_products_listing"> Product Listing</a>
                        </li>
                        <li><a href="configuration.php?gID=8"> Order display</a>
                        </li>
                    </ul>

    Should look like this:

                <li><a href=""> Listing</a>
                    <ul>
                        <li><a href="modules.php?set=modules_products_listing"> Product Listing</a>
                        </li>
                        <li><a href="configuration.php?gID=8"> Order display</a>
                        </li>
                    </ul>
                </li>

    Fix this (all occurrences) and let me know if you still have any troubles.

    #3407
    oitsuki
    Participant

    Ok I am looking, but it’s an error of me sorry.

    I let you my code php (it can help some people), you will see inside the code a class nav-item, this element can allow to work with boostrap4. (It can help yu for next release).

    In this code , I put in comment the where the problem start, maybe I forget something !!!

    Thanks

    
           <ul id="main-menu" class="sm sm-mint">
    <?php
      // level 1
      foreach($menu_parent as $key => $menus) {
        if (is_file(OSCOM::getConfig('dir_root') . 'images/menu/' . $menus['image'])) {
          $image = HTML::image($OSCOM_Template->getImageDirectory() . '/menu/' . $menus['image'], null, null, 15);
        } else {
          $image = '';
        }
    
        if ($menus['link'] != '') {
          echo '<li><a href="link($menus['link']) . '">' . $menus['label'] . '</a></li>';
        } else {
          echo '<li><a>' . $image . ' ' . $menus['label'] . '</a>';
        }
    
    // level 2
        if (!is_null($menus['sub_menu'])) {
          echo '<ul>';
          foreach($menus['sub_menu'] as $second_level) {
    
            if (is_file(OSCOM::getConfig('dir_root') . 'images/menu/' . $menu_sub[$second_level]['image'])) {
              $image = HTML::image($OSCOM_Template->getImageDirectory() . '/menu/' . $menu_sub[$second_level]['image'], null, null, 15);
            } else {
              $image = '';
            }
    
            if ($menu_sub[$second_level]['link'] != '') {
              echo '<li><a href="link($menu_sub[$second_level]['link']) . '">' . $image . ' ' . $menu_sub[$second_level]['label'] . '</a></li>';
            } else {
              echo '<li class="sub_menu_1st_level"><a>' . $image . ' '  . $menu_sub[$second_level]['label'] . '</a>';
            }
    
    // level 3
            if ($menu_sub[$second_level]['sub_menu'] != '')  {
              echo '<ul>';
    
              foreach($menu_sub[$second_level]['sub_menu'] as $third_level) {
    
                if (is_file(OSCOM::getConfig('dir_root') . 'images/menu/' . $menu_sub[$third_level]['image'])) {
                  $image = HTML::image($OSCOM_Template->getImageDirectory() . '/menu/' . $menu_sub[$third_level]['image'], null, null, 15);
                }
    
                if (!is_null($menu_sub[$third_level]['link'])) {
                  echo '<li><a href="link($menu_sub[$third_level]['link']) . '">' . $image . ' ' . $menu_sub[$third_level]['label'] . '</a></span></li>';
                } else {
                  echo '<li><a>' . $image . ' ' . $menu_sub[$third_level]['label'] . '</a>';
                }
    
    
    
    
    
    /*
    * pb start here
    
                if ($menu_sub[ $third_level]['sub_menu'] != '')  {
                  echo '<ul>';
    
                  foreach($menu_sub[ $third_level ]['sub_menu'] as $fourth_level) {
    
                    if (is_file(OSCOM::getConfig('dir_root') . 'images/menu/' . $menu_sub[$fourth_level]['image'])) {
                      $image = HTML::image($OSCOM_Template->getImageDirectory() . '/menu/' . $menu_sub[$fourth_level]['image'], null, null, 15 );
                    }
    
                    if (!is_null($menu_sub[$fourth_level]['link'])) {
                      echo '<li><a href="link($menu_sub[$fourth_level]['link']) . '">' . $image . ' ' . $menu_sub[$fourth_level]['label'] . '</a></li>';
                    } else {
                      echo '<li><a>' . $image . ' ' . $menu_sub[$fourth_level]['label'] . '</a>';
                    }
    
    
                    echo '</li>';
                  }
                  echo '</ul>';
                }
    */
                echo '</li>';
              }
              echo '</ul>';
            }
            echo '</li>';
          }
          echo '</ul>';
        }
        echo '</li>';
      }
    ?>
      </ul>
    
    </nav>
    
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘1.0.x’ is closed to new topics and replies.