You are here

simple-mega-menu.html.twig in Simple Mega Menu 8

Same filename and directory in other branches
  1. 2.0.x templates/simple-mega-menu.html.twig

simple_mega_menu.html.twig Default theme implementation to present Simple mega menu data.

This template is used when viewing Simple mega menu pages.

Available variables:

  • content: A list of content items. Use 'content' to print all content, or
  • attributes: HTML attributes for the container element.
  • bundle : the simple mega menu bundle
  • view_mode : the view mode used
  • simple_mega_menu: the simple mega menu entity

File

templates/simple-mega-menu.html.twig
View source
  1. {#
  2. /**
  3. * @file simple_mega_menu.html.twig
  4. * Default theme implementation to present Simple mega menu data.
  5. *
  6. * This template is used when viewing Simple mega menu pages.
  7. *
  8. *
  9. * Available variables:
  10. * - content: A list of content items. Use 'content' to print all content, or
  11. * - attributes: HTML attributes for the container element.
  12. * - bundle : the simple mega menu bundle
  13. * - view_mode : the view mode used
  14. * - simple_mega_menu: the simple mega menu entity
  15. *
  16. * @see template_preprocess_simple_mega_menu()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. {%
  22. set classes = [
  23. 'simple-mega-menu',
  24. 'mega-menu-item',
  25. 'simple-mega-menu-type-' ~ bundle|clean_class,
  26. view_mode ? 'view-mode-' ~ view_mode|clean_class,
  27. ]
  28. %}
  29. <div{{ attributes.addClass(classes) }}>
  30. {% if content %}
  31. {{- content -}}
  32. {% endif %}
  33. </div>