Start a new discussion
To start a new discussion please visit the discussions section of the GitHub home page of the project.
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
- This topic has 3 replies, 2 voices, and was last updated 7 years, 12 months ago by oitsuki.
-
AuthorPosts
-
November 24, 2016 at 06:42 #3397oitsukiParticipant
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>
November 24, 2016 at 06:43 #3398oitsukiParticipantthe 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>
November 24, 2016 at 16:18 #3399adminKeymasterYou’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.
November 25, 2016 at 14:10 #3407oitsukiParticipantOk 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>
-
AuthorPosts
- The forum ‘1.0.x’ is closed to new topics and replies.