nimafire Posted July 29, 2015 Share Posted July 29, 2015 Hey, i want to add new item in navbar + 3 child like: Main-name 1)item1 2)item2 3)item3 it possible to add "Main-name" in navbar with: $primaryNavbar->addChild('Main-name') ->setOrder(81); now how can i add these 3 items to "Main-name" ? 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted July 29, 2015 Share Posted July 29, 2015 This should work $primaryNavbar -> addChild('Main-name') -> setOrder(81); $primaryNavbar -> getChild('Main-name') -> addChild('item1', array('label' => 'item1', 'uri' => 'item1', 'order' => '1', )); $primaryNavbar -> getChild('Main-name') -> addChild('item2', array('label' => 'item2', 'uri' => 'item2', 'order' => '2', )); $primaryNavbar -> getChild('Main-name') -> addChild('item3', array('label' => 'item3', 'uri' => 'item3', 'order' => '3', )); 0 Quote Link to comment Share on other sites More sharing options...
nimafire Posted July 30, 2015 Author Share Posted July 30, 2015 This should work $primaryNavbar -> addChild('Main-name') -> setOrder(81); $primaryNavbar -> getChild('Main-name') -> addChild('item1', array('label' => 'item1', 'uri' => 'item1', 'order' => '1', )); $primaryNavbar -> getChild('Main-name') -> addChild('item2', array('label' => 'item2', 'uri' => 'item2', 'order' => '2', )); $primaryNavbar -> getChild('Main-name') -> addChild('item3', array('label' => 'item3', 'uri' => 'item3', 'order' => '3', )); nice one, i have fix my code now, how about HR? how can i add line between child items? 0 Quote Link to comment Share on other sites More sharing options...
nimafire Posted August 6, 2015 Author Share Posted August 6, 2015 any update 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.