vendor/score/cms/src/Resources/views/Public/default/subpage.html.twig line 1

Open in your IDE?
  1. {# {% extends  template is defined and template is not null ? [template, '@ScoreCms/Page/Public/baseLayout.html.twig'] : '@ScoreCms/Page/Public/baseLayout.html.twig' %} #}
  2. {% extends cms_template() %}
  3. {% import "@ScoreBase/Default/macros.html.twig" as m %}
  4. {% set reactFiles = cms_react_apps(page.pageBlocks|map(pb => pb.block.type)) %}
  5. {% macro getCenterClassNames(p) %}{{ 
  6.     p.hasLeftBar and p.hasRightBar 
  7.         ? "govuk-grid-column-full govuk-grid-column-one-half-from-desktop" 
  8.         : p.hasLeftBar or p.hasRightBar  
  9.             ? "govuk-grid-column-full govuk-grid-column-three-quarters-from-desktop" 
  10.             : "govuk-grid-column-full"
  11.  }}{% endmacro %}
  12. {% block title %}{{page.title}} | {{parent()}} {% endblock %}
  13. {% block stylesheets %}
  14. {{ m.filterCss(reactFiles) }}
  15.     {{parent()}}
  16. {% endblock %}
  17. {% block javascripts %}
  18. {{ m.filterJs(reactFiles) }}
  19.     {{parent()}}
  20. {% endblock %}
  21.  {% block footer_logo %}
  22.     {{ 'idsk-footer-logo' | cms_text | raw  }}
  23.  {% endblock %}
  24. {% block body %}
  25.     <div class="container{{ page_container_fluid is defined and page_container_fluid ? "-fluid" }} cms_seo_{{ page.seoId | replace({'/': "_"}) }}"> {# you can set in fwig globals #}
  26.         <div class="row govuk-grid-row">
  27.             <div class="col-md-12 govuk-grid-column-full">
  28.                 {% if not (hide_pages_heading is defined and hide_pages_heading) %} {# you can set in fwig globals #}
  29.                     <h1 class="govuk-heading-xl">{{ page.name }}</h1>
  30.                 {% endif %}
  31.                 {% if  page.seoId == 'homepage' and not (hide_homepage_intro_block is defined and hide_homepage_intro_block) %} {# you can set in fwig globals #}
  32.                     {{ include('@ScoreCms/Public/idsk/_intro_block.html.twig') }}
  33.                 {% endif %}
  34.             </div>
  35.         </div>
  36.         <div class="{{page.layout}} row govuk-grid-row">
  37.             {% if page.hasLeftBar %}
  38.                 <div class="col-md-12 col-lg-3 govuk-grid-column-full govuk-grid-column-one-quarter-from-desktop">
  39.                     {% for pageBlock in page.pageBlocks %}
  40.                         {% if 'left' == pageBlock.place %}
  41.                             {# <h2>{{ pageBlock.block.name }}</h2> #}
  42.                             {{ include('@ScoreCms/Public/default/_block.html.twig',{'pageBlock': pageBlock}) }}
  43.                         {% endif %}
  44.                     {% endfor %}
  45.                 </div>
  46.             {% endif %}
  47.             <div class="col {{  _self.getCenterClassNames(page) }}">
  48.             {% for pageBlock in page.pageBlocks %} {# sections for wavex #}
  49.                 {% if 'center' == pageBlock.place %}
  50.                     <div id="cms-block-{{ pageBlock.block.id }}" class="{{ pageBlock.block.paramsArr.nav is defined and pageBlock.block.paramsArr.nav ? "section "}} cms-block-c-{{ pageBlock.block.id }}">
  51.                         {% if 'pageContent' == pageBlock.block.type %}
  52.                             {{ page.content|raw }}
  53.                         {% else %}
  54.                             {# <h2>{{ pageBlock.block.name }}</h2>#}
  55.                             {{ include('@ScoreCms/Public/default/_block.html.twig',{'pageBlock': pageBlock}) }}
  56.                         {% endif %}
  57.                     </div>
  58.                 {% endif %}
  59.             {% endfor %}
  60.             </div>
  61.             {% if page.hasRightBar %}
  62.                 <div class="col-md-12  col-lg-3 govuk-grid-column-full govuk-grid-column-one-quarter-from-desktop">
  63.                     {% for pageBlock in page.pageBlocks %}
  64.                         {% if 'right' == pageBlock.place %}
  65.                         {#     <h2>{{ pageBlock.block.name }}</h2>#}
  66.                             {{ include('@ScoreCms/Public/default/_block.html.twig',{'pageBlock': pageBlock}) }}
  67.                         {% endif %}
  68.                     {% endfor %}
  69.                 </div>
  70.             {% endif %}
  71.         </div>
  72.     </div>
  73. {% endblock %}