templates/themesWebsite/blog_cpn/elements/blocks.html.twig line 1

Open in your IDE?
  1. {% if page.theme != "default" %}
  2.     {% if blocks is not empty %}
  3.         {% for block in blocks %}
  4.             {% if is_granted("ROLE_SUPER_ADMIN") %}<div id='block_{{ block.id }}'>{% endif %}
  5.             {% if (block.onlyVisitor == true) and (block.visibilityUser == false)  and app.user is null %}
  6.                 {# VISITEUR #}
  7.                 {% include "/themesWebsite/blog_cpn/elements/collections.html.twig" with {'block':block} %}
  8.             {% elseif (block.onlyVisitor == false) and (block.visibilityUser == true) and app.user is not null %}
  9.                 {#  CONNECTE #}
  10.                 {% include "/themesWebsite/blog_cpn/elements/collections.html.twig" with {'block':block} %}
  11.             {% elseif (block.onlyVisitor == false) and (block.visibilityUser == false) %}
  12.                 {#  VISITEUR + CONNECTE #}
  13.                 {% include "/themesWebsite/blog_cpn/elements/collections.html.twig" with {'block':block} %}
  14.             {% elseif (block.onlyVisitor is null) and (block.visibilityUser is null) %}
  15.                 {#  VISITEUR + CONNECTE #}
  16.                 {% include "/themesWebsite/blog_cpn/elements/collections.html.twig" with {'block':block} %}
  17.             {% endif %}
  18.             {% if is_granted("ROLE_SUPER_ADMIN") %}</div>{% endif %}
  19.             {% if is_granted("ROLE_SUPER_ADMIN") %}
  20.                 {% if (block.onlyVisitor == true) and (block.visibilityUser == false)  and app.user is null %}
  21.                     {# VISITEUR #}
  22.                     {% include "/themesWebsite/blog_cpn/elements/block_superadmin.html.twig" with {'block':block,'page':page} %}
  23.                 {% elseif (block.onlyVisitor == false) and (block.visibilityUser == true)  and app.user is not null %}
  24.                     {#  CONNECTE #}
  25.                     {% include "/themesWebsite/blog_cpn/elements/block_superadmin.html.twig" with {'block':block,'page':page} %}
  26.                 {% elseif (block.onlyVisitor == false) and (block.visibilityUser == false) %}
  27.                     {#  VISITEUR + CONNECTE #}
  28.                     {% include "/themesWebsite/blog_cpn/elements/block_superadmin.html.twig" with {'block':block,'page':page} %}
  29.                 {% elseif (block.onlyVisitor is null) and (block.visibilityUser is null) %}
  30.                     {#  VISITEUR + CONNECTE #}
  31.                     {% include "/themesWebsite/blog_cpn/elements/block_superadmin.html.twig" with {'block':block,'page':page} %}
  32.                 {% endif %}
  33.             {% endif %}
  34.         {% endfor %}
  35.     {% endif %}
  36. {% else %}
  37.     {% include "/themesWebsite/blog"~ theme_selection ~"/components/pages/simple.html.twig" with {'page':page} %}
  38.     {% if is_granted("ROLE_SUPER_ADMIN") %}<div class="edit-spm spmd-red-color"></div>{% endif %}
  39. {% endif %}
  40. <div id="show_modal"></div>