You are here

hierarchical-navigation.html.twig in Cheeseburger Menu 8

<div class="cheeseburger-menu__navigation">
    <ul class="cheeseburger-menu__navigation-list">
        {% for item in tree %}
            <li class="cheeseburger-menu__navigation-list-item cheeseburger-menu__navigation-list-item--{{ item.class }}" data-drupal-selector="cheeseburger-menu--{{ item.class }}">
            {% if item.url %}
                <a href="{{ item.url }}">{{ item.title }}</a>
            {% else %}
                <span>{{ item.title }}</span>
            {% endif %}
            </li>
        {% endfor %}
    </ul>
</div>

File

templates/hierarchical-navigation.html.twig
View source
  1. <div class="cheeseburger-menu__navigation">
  2. <ul class="cheeseburger-menu__navigation-list">
  3. {% for item in tree %}
  4. <li class="cheeseburger-menu__navigation-list-item cheeseburger-menu__navigation-list-item--{{ item.class }}" data-drupal-selector="cheeseburger-menu--{{ item.class }}">
  5. {% if item.url %}
  6. <a href="{{ item.url }}">{{ item.title }}</a>
  7. {% else %}
  8. <span>{{ item.title }}</span>
  9. {% endif %}
  10. </li>
  11. {% endfor %}
  12. </ul>
  13. </div>