TGK Posted August 28, 2018 Share Posted August 28, 2018 Hi, thereis any way to add sub menu to menu options in Primary Nav Bar. Primary option " Services " Services VPS Cheaps <-- I need add other 4 sub menu Options for this option also VPS Regulars <-- I need add other 4 sub menu options for this option also VPS FULL <-- I need add other 4 sub menu options for this option also code example: Quote add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $primaryNavbar->addChild('Services X') ->setOrder(11); $primaryNavbar->getChild('Services X') ->addChild('VPS Cheaps') ->setUri('https://example.com/cart.php?a=add&pid=14') ->setOrder(1); // i need that child " VPS Cheaps " have 4 sub child ( menu) on something like that. thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 28, 2018 Share Posted August 28, 2018 2 hours ago, TGK said: there is any way to add sub menu to menu options in Primary Navbar. just by using a hook? not easily. the problem would be that the navbar template is expecting parent and child, whereas you want to give it grandparent, parent and child. I believe the array itself could handle more than 2 levels, but you'd have to rewrite the template to expect it and output it correctly... whether that's worth the effort, or if it would be quicker to dump navbar and use a megamenu solution instead, is for you to decide. the other way would be to fake indentation of your grandchildren links... but from your description, you're going to end up with a dropdown of 15+ items.. 0 Quote Link to comment Share on other sites More sharing options...
TGK Posted August 28, 2018 Author Share Posted August 28, 2018 yes you right actually i have 10 dropdown items and i need to put then in categories. thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 4, 2018 Share Posted September 4, 2018 @TGK On 29/08/2018 at 00:13, TGK said: yes you right actually i have 10 dropdown items and i need to put then in categories. just as an update to your question, you can create nested menus using the Advanced Menu Manager addon... there is an online demo available, linked from their CodeCanyon page, where you can play with the admin functionality, and you'll instantly see the results on the client side. 0 Quote Link to comment Share on other sites More sharing options...
TGK Posted September 7, 2018 Author Share Posted September 7, 2018 thank Brian! i will check it 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.