templates/content/page.html.twig line 35

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block body %}
  3.     <div class="my-4 {% if content.getContentMetaByKey('class') is not null %}{{content.getContentMetaByKey('class').getMetavalue()}}{% endif %}">
  4.     
  5.     {# TODO:
  6.        The tmpl folder was meant for these specific page templates that are selected from the admin interface...
  7.        but it's filled with a bunch of other template files right now. This should be cleaned up later, either these templates
  8.        should be moved to another folder or any templates besides these should be moved elsewhere.
  9.     #}
  10.     
  11.     
  12.     {# Note: When new templates are added here, they'll also need to be added to the pages.yml and content.yml easy admin files so that they can be selected #}
  13.         
  14.     {% if content.template == 1 %}
  15.         {% include "content/tmpl/1-col-full.html.twig" %}
  16.     {% elseif content.template == 2 %}
  17.         {% include "content/tmpl/1-col-sidebar.html.twig" %}
  18.     {% elseif content.template == 3 %}
  19.         {% include "content/tmpl/2-col-sidebar.html.twig" %}
  20.     {% elseif content.template == 4 %}
  21.         {% include "content/tmpl/3-col-sidebar.html.twig" %}
  22.     {% elseif content.template == 4 %}
  23.         {% include "content/tmpl/3-col-sidebar.html.twig" %}
  24.     {% elseif content.template == 5 %}
  25.         {# include "content/tmpl/webinars.html.twig" #}
  26.         {{ render(controller(
  27.             'App\\Controller\\RCS\\ContentController::webinars',
  28.             { 'content': content }
  29.         )) }}
  30.     {% elseif content.template == 10 %}
  31.         {# include "content/tmpl/partner-webinars.html.twig" #}
  32.         {{ render(controller(
  33.             'App\\Controller\\RCS\\ContentController::partnerwebinars',
  34.             { 'content': content }
  35.         )) }}
  36.     {% elseif content.template == 6 %}
  37.         {# include "content/tmpl/podcasts.html.twig" #}
  38.         {{ render(controller(
  39.             'App\\Controller\\Master\\ContentController::podcasts',
  40.             { 'content': content }
  41.         )) }}
  42.     {% elseif content.template == 7 %}
  43.         {% if site_code == constant("App\\Entity\\Content::SITE_AAR") %}
  44.             {{ render(controller(
  45.                 'App\\Controller\\AAR\\ContentController::roofinggalleries',
  46.                 { 'content': content }
  47.             )) }}
  48.         {% else %}
  49.             {{ render(controller(
  50.                 'App\\Controller\\RCS\\ContentController::roofinggalleries',
  51.                 { 'content': content }
  52.             )) }}
  53.         {% endif %}
  54.     {% elseif content.template == 8 %}
  55.         {% if site_code == constant("App\\Entity\\Content::SITE_AAR") %}
  56.             {{ render(controller(
  57.                 'App\\Controller\\AAR\\ContentController::partnergalleries',
  58.                 { 'content': content }
  59.             )) }}
  60.         {% else %}
  61.             {{ render(controller(
  62.                 'App\\Controller\\RCS\\ContentController::partnergalleries',
  63.                 { 'content': content }
  64.             )) }}
  65.         {% endif %}
  66.     {% elseif content.template == 9 %}
  67.         {{ render(controller(
  68.             'App\\Controller\\Master\\ContentController::meetinfluencers',
  69.             { 'content': content }
  70.         )) }}
  71.     {% elseif content.template == 11 %}
  72.         {{ render(controller(
  73.             'App\\Controller\\RCS\\ContentController::zoomembed',
  74.             { 'content': content }
  75.         )) }}
  76.     {% elseif content.template == 12 %}
  77.         {{ render(controller(
  78.             'App\\Controller\\Master\\ContentController::partnerspage',
  79.             { 'content': content }
  80.         )) }}
  81.     {% elseif content.template == 26 %}
  82.             {{ 
  83.             render(controller(
  84.                 'App\\Controller\\Master\\ContentController::ebooks',
  85.                 { 
  86.                     'content': content,
  87.                     'slug' : app.request.attributes.get('slug')
  88.                 }
  89.             ))
  90.         }}
  91.     {% elseif content.template == 15 %}
  92.         {% include "content/tmpl/RLW.html.twig" %}
  93.     {% elseif content.template == 27 %}
  94.         {% include "content/tmpl/no-ads.html.twig" %}
  95.     {% else %}
  96.         {% include "content/tmpl/1-col-sidebar.html.twig" %}
  97.     {% endif %}
  98.     </div>
  99. {% endblock %}