menu-builder icon indicating copy to clipboard operation
menu-builder copied to clipboard

Enhancement: Document setAttributes

Open SilverPaladin opened this issue 10 years ago • 1 comments

Had to read through code to figure out how to add an attribute to the generated <ul> element.

To add a class to the containing <ul> do this: $menu = new Tlr\Menu\MenuItem; $menu->setAttributes(['class'=>'nav classes']);

SilverPaladin avatar Sep 23 '14 15:09 SilverPaladin

Good point - when writing the readme, i was more focussed on getting a bit in about all the possible things. I might take an opportunity to write a slightly more fully featured one...!

tedslittlerobot avatar Sep 23 '14 15:09 tedslittlerobot