hi! great that you fixed the order sorting bug! found a new one: the "title" attributes on the "a" tags are not correctly getting populated. the problem is: /plugins/flynsarmy/menu/models/Menu.php line 68. this "title="%4$s"" should be changed to title="%6$s" also it might be great to add the option to make an external link (link that opens in new window/tab)
Hey. Thanks for the fix :) I've implemented it and pushed the update. Also added a target
dropdown while I was at it. Please test and let me know if everything's OK.
hey! nice touch splitting the attributes to tabs. the "target" and "title" attributes are getting populated correctly, but there is a bug where a attribute of: ,="" is being created on the "a" tag
got the update. works, but the "selected item id" i think doesn't work. i have set it to "active", but the class doesn't show on the link when i'm on the active page.
It's working fine for me? Can you paste your {% component %} line please?
In my case I used
{% component 'menu' selected_item='home' selected_item_class='active' %}
and the item with 'home' as its selected item ID was marked with an 'active' class.
hey! sorry about the previous post. figured it out. needed: "selected_item_class="active" selected_item=this.page.title|lower" on the component. then it worked fine
hi, does the "Selected Item ID" have to be the same as the "Navigation Label"? i tried to use a different id than the label and the class active no longer appears on the "li".
Sorry I didn't get notified about your message. Selected Item ID has to match the selected_item
value you pass to the menu to make the LI active.
Navigation Label is just the text that appears inside the anchor element.
Last updated
hi! just thought i would let you know that the "title" attribute is getting wrongly populated. now it is receiving the information from class attribute. so it looks like: title="my-class my-other-class menu-item-level-0"
here ya go:
{% component 'main_navigation' before_url_item_label='' selected_item_class="active" selected_item=this.page.title|lower %}
How are you seeing a title attribute at all? It exists in the before_url_item_label
attribute which you're setting to an empty string. Default value is
'before_url_item_label' => '<a href="%1$s" title="%6$s" class="menu-title" target="%7$s">', //array($url, $id, $id_attrib, $class_attrib, $depth, $title, $target)
1-15 of 15