You are here

mmenu.html.twig in Mobile sliding menu 8

Default theme implementation to display a mmenu.

Available variables:

  • $mmenu: the original mmenu definitions.
  • $id: the id of the mmenu.
  • $name: the machine name of the mmenu.
  • $blocks: an array that contains all rendered blocks and its configurations.

See also

template_preprocess()

template_preprocess_mmenu()

template_process()

File

tpl/mmenu.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a mmenu.
  5. *
  6. * Available variables:
  7. * - $mmenu: the original mmenu definitions.
  8. * - $id: the id of the mmenu.
  9. * - $name: the machine name of the mmenu.
  10. * - $blocks: an array that contains all rendered blocks and its configurations.
  11. *
  12. * @see template_preprocess()
  13. * @see template_preprocess_mmenu()
  14. * @see template_process()
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. <nav id="{{ id }}" class="mmenu-nav clearfix">
  20. <ul>
  21. {% for block in blocks %}
  22. {% if block.collapsed %}
  23. <li class="mmenu-collapsed">
  24. {% if block.subject is not empty %}
  25. <span class="mmenu-block-collapsed mmenu-block"><i class="{{ block.icon_class }}"></i><span class="mmenu-block-title">{{ block.subject }}</span></span>
  26. {% endif %}
  27. {% if block.wrap %}
  28. <ul><li class="mmenu-block-wrap"><span>{{ block.content }}</span></li></ul>
  29. {% else %}
  30. {{ block.content }}
  31. {% endif %}
  32. </li>
  33. {% else %}
  34. {% if block.subject is not empty %}
  35. <li class="mmenu-expanded">
  36. <span class="mmenu-block-expanded mmenu-block"><i class="mmenu-block-icon mmenu-block-icon-{{ block.module }}-{{ block.delta }}"></i><span class="mmenu-block-title">{{ block.subject }}</span></span>
  37. </li>
  38. {% endif %}
  39. {% if block.wrap %}
  40. <ul><li class="mmenu-block-wrap"><span>{{ block.content }}</span></li></ul>
  41. {% else %}
  42. {{ block.content }}
  43. {% endif %}
  44. {% endif %}
  45. {% endfor %}
  46. </ul>
  47. </nav>