How to use handle defined for menu item?
joshuadavidthomas opened this issue · comments
Josh Thomas commented
When adding an item to a menu, the handle field has the text 'Use this field to optionally specify an additional value for each menu item, which you can then reference in custom menu templates.'
Reading through the docs and the code base, I'm a bit puzzled on how to use this handle when rendering a menu through a custom template.
According to the docs, the only items available when rendering are href
, text
, active_class
, and has_children_in_menu
. When looping through the menu using {% for item in menu_items %}
, I've tried calling {{ item.handle }}
, but nothing is returned.