Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save thejimbirch/826c367f085c7750c7690c31509c5225 to your computer and use it in GitHub Desktop.

Select an option

Save thejimbirch/826c367f085c7750c7690c31509c5225 to your computer and use it in GitHub Desktop.
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul class="nav navbar-nav">
{% else %}
<ul class="nav navbar-nav">
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
@jorluiseptor
Copy link
Copy Markdown

Thanks!

@mhdcasa
Copy link
Copy Markdown

mhdcasa commented Aug 4, 2020

what abaout drop down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment