My menu is loaded from a database, and I integrated it into your plugin and all was working fine with your bootstrap solution, but I have an important issue. I checked the documentation and the source code and I have not found an answer. When I include an attribute class, the active class is not shown, just the attribute class that overrides the active class.
And from the problem I mentioned before, I also found another suggestion (not issue). If I include two class attributes, the second replaces the first one. For example:
if(something){
$first_level->attribute('class', 'something');
}
if(another thing){
$first_level->attribute('class', 'another');
}
This would show just the 'another' class, and delete the 'something' class. Yeah, I should put both in one line with conditions, but it would be easier and more flexible if attributes of the same name could accumulate instead of replacing the values by the new ones for attributes, and the active class.
And another suggestion would be to include an 'isActive' function. This could helped me to solve my last issue, just by using an if($item->isActive){ // add active attribute manually }, but I didn't found that function either.
My menu is loaded from a database, and I integrated it into your plugin and all was working fine with your bootstrap solution, but I have an important issue. I checked the documentation and the source code and I have not found an answer. When I include an attribute class, the active class is not shown, just the attribute class that overrides the active class.
And from the problem I mentioned before, I also found another suggestion (not issue). If I include two class attributes, the second replaces the first one. For example: if(something){ $first_level->attribute('class', 'something'); } if(another thing){ $first_level->attribute('class', 'another'); } This would show just the 'another' class, and delete the 'something' class. Yeah, I should put both in one line with conditions, but it would be easier and more flexible if attributes of the same name could accumulate instead of replacing the values by the new ones for attributes, and the active class.
And another suggestion would be to include an 'isActive' function. This could helped me to solve my last issue, just by using an if($item->isActive){ // add active attribute manually }, but I didn't found that function either.