You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to get this working with a bootstrap template but i cannot get one of the menu items to display correct.
I'm using a manually filled menu list for now and so far i've got the following code (placed inline in my view, so probably not the right location for this logic but yeah).
Menu::handler('main')->getItemsAtDepth(0)->map(function($item)
{
if($item->hasChildren())
{
// Add a class to the LI$item->addClass('dropdown');
// Add a class to the A$item->getContent()
->addClass('dropdown-toggle')
->setAttribute('data-toggle', 'dropdown');
// Add a class to the UL$item->getChildren()
->addClass('dropdown-menu');
}
});
Hi,
I'm trying to get this working with a bootstrap template but i cannot get one of the menu items to display correct.
I'm using a manually filled menu list for now and so far i've got the following code (placed inline in my view, so probably not the right location for this logic but yeah).
This outputs the following:
Now the problem i'm having is that i need the 'dropdown-toggle' class to be added to the 'Child test' anchor tag and not to the 'li' element.
Can this be done without using raw?
The text was updated successfully, but these errors were encountered: