bundles/FoxHabbit/BasisBundle/Resources/views/Areas/basisbundle-topnav/level-types/wrapper.html.twig line 1

Open in your IDE?
  1. {% set currentLevelConfig = levelConfig[0] %}
  2. {% import '@FoxHabbitBasis/Macro/wrap.html.twig' as wrap_macro %}
  3. {{ wrap_macro.wrapperOpen( currentLevelConfig.type.wrapper, _context) }}
  4.     {% for page in navigation %}
  5.         {% if nav_page_check_permissions(page, app.getUser()) %}
  6.             {{ wrap_macro.wrapperOpen( currentLevelConfig.type.page_wrapper|default(null), _context) }}
  7.                 {% set hasChildren = false %}
  8.                 {% if page.hasChildren() %}
  9.                     {% for subpage in page %}
  10.                         {% if subpage.visible %}
  11.                             {% set hasChildren = true %}
  12.                         {% endif %}
  13.                     {% endfor %}
  14.                 {% endif %}
  15.                 {% if hasChildren and currentLevelConfig.with_children|default(false) and currentLevelConfig.with_children.template and levelConfig[1] is defined %}
  16.                     {% set template = currentLevelConfig.with_children.template %}
  17.                     {% if not ( template starts with 'AppBundle' or template starts with '@App') %}
  18.                         {% set template = '@FoxHabbitBasis/Areas/basisbundle-topnav/level-entries/' ~ template ~ '.html.twig' %}
  19.                     {% endif %}
  20.                     {% include template with {
  21.                         page: page, entryConfig: currentLevelConfig.with_children, childLevelConfig: levelConfig|slice(1) } %}
  22.                 {% elseif currentLevelConfig.entry.template %}
  23.                     {% set template = currentLevelConfig.entry.template %}
  24.                     {% if not ( template starts with 'AppBundle' or template starts with '@App') %}
  25.                         {% set template = '@FoxHabbitBasis/Areas/basisbundle-topnav/level-entries/' ~ template ~ '.html.twig' %}
  26.                     {% endif %}
  27.                     {% include template with {
  28.                         page: page, entryConfig: currentLevelConfig.entry, childLevelConfig: levelConfig|slice(1) } %}
  29.                 {% endif %}
  30.             {{ wrap_macro.wrapperClose( currentLevelConfig.type.page_wrapper|default(null)) }}
  31.         {% endif %}
  32.     {% endfor %}
  33.     {% if currentLevelConfig.languageSelector|default(false) %}
  34.         {% include '@FoxHabbitBasis/Areas/basisbundle-topnav/language-selectors/' ~ currentLevelConfig.languageSelector.template ~ '.html.twig' with {
  35.             navigation: mainNavigation, levelConfig: currentLevelConfig.languageSelector, pageDocument: pageDocument, navRootProperty: currentLevelConfig.languageSelector.nav_root_property} %}    
  36.     {% endif %}
  37. {{ wrap_macro.wrapperClose( currentLevelConfig.type.wrapper) }}