Add class to the link items
This commit is contained in:
parent
d91434b9b6
commit
7c335eb705
1 changed files with 3 additions and 2 deletions
|
@ -31,8 +31,9 @@
|
|||
https://gitlab.com/agaric/sites/agaric-com/issues/77
|
||||
#}
|
||||
{{ menus.menu_links(items, attributes, 0, menu_name) }}
|
||||
{% set submenu_attributes = create_attribute() %}
|
||||
{% macro menu_links(items, attributes, menu_level, menu_name) %}
|
||||
{% set submenu_attributes = create_attribute() %}
|
||||
{% set link_attributes = create_attribute().addClass('navbar-item') %}
|
||||
{% import _self as menus %}
|
||||
{% set submenu_classes = [
|
||||
'navbar-item',
|
||||
|
@ -44,7 +45,7 @@
|
|||
<div{{ submenu_attributes.addClass(submenu_classes) }}>
|
||||
{% endif %}
|
||||
{% for item in items %}
|
||||
{{ link(item.title, item.url) }}
|
||||
{{ link(item.title, item.url, link_attributes) }}
|
||||
{% if item.below %}
|
||||
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue