templates/areas/standard-teaser/view.html.twig line 38

Open in your IDE?
  1. <section class="area-standard-teaser bg-light text-center">
  2.     <div class="container">
  3.         <h2>{{ pimcore_input('standardTeaserHeading') }}</h2>
  4.         <div class="card-deck mb-3 text-center {{ editmode ? 'no-gutters' : '' }} ">
  5.             {% for t in 0..2 %}
  6.                 {%
  7.                     set select = pimcore_select('type_' ~ t, {
  8.                         width: 110,
  9.                         reload: true,
  10.                         store: [
  11.                             ['direct','direct'],
  12.                             ['snippet','snippet'],
  13.                             ['news','news']
  14.                         ],
  15.                         class: 'align-middle'
  16.                     })
  17.                 %}
  18.                 {% if editmode %}
  19.                     <div class="col-md-4">
  20.                         <div class="mb-3">
  21.                             <span class="editmode-label align-middle">Type:</span>
  22.                             {{ select|raw }}
  23.                         </div>
  24.                 {% endif %}
  25.                 {% set type = select.getData() %}
  26.                 {% if type == "direct" %}
  27.                     {{
  28.                         include('snippets/standard-teaser.html.twig', {
  29.                             suffix: (t+1)
  30.                         })
  31.                     }}
  32.                 {% elseif type == "news" %}
  33.                     {{
  34.                         pimcore_renderlet('newsteaser_' ~ t, {
  35.                             type: 'object',
  36.                             editmode: editmode,
  37.                             controller: 'App\\Controller\\NewsController::newsTeaserAction',
  38.                             title: 'Drag a news object here',
  39.                             height : 'auto',
  40.                             width: '100%'
  41.                         })
  42.                     }}
  43.                 {% else %}
  44.                     {{ pimcore_snippet('teaser_' ~ t) }}
  45.                 {% endif %}
  46.                 {% if editmode %}
  47.                     </div>
  48.                 {% endif %}
  49.             {% endfor %}
  50.         </div>
  51.     </div>
  52. </section>