i understood how create menu child elements of specific page (e.g. id=5) this:
$pages = \ip\menu\helper::getchilditems($pageid = 5); echo ipslot('menu', $pages); works far. formatting due lack of bootstrap classes enhancable.
but how can add custom classes ul of menu? this:
$options = array( 'items' => 'menu2', 'attributes' => array('class' => 'nav nav-stacked') ); echo ipslot('menu', $options); but how can combine these 2 methods?
all in formation in documentation - https://www.impresspages.org/docs/navigation ("add custom menu items").
items variable supports menu objects, too.
in case final solution should this:
$pages = \ip\menu\helper::getchilditems($pageid = 5); $options = array( 'items' => $pages, 'attributes' => array('class' => 'nav nav-stacked') ); echo ipslot('menu', $options);
Comments
Post a Comment