templates/bundles/ProviderBundle/areas/quote/view.html.twig line 1

Open in your IDE?
  1. {% from '@Provider/macros/include-svg.html.twig' import includeSvg %}
  2. {# Default block settings #}
  3. {% set class = pimcore_input('class').getData() %}
  4. {% set marginTop = pimcore_select('margin_top').getData() %}
  5. {% set marginBottom = pimcore_select('margin_bottom').getData() %}
  6. {% set containerWidth = pimcore_select('container_width').getData() %}
  7. {% set areaClass = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
  8. {% set anchorId = pimcore_input('anchor').getData() %}
  9. {# Quote block settings #}
  10. {% set type = pimcore_select('type').getData() %}
  11. <div class="area area--quote {{ areaClass }}"{% if anchorId %} id="{{ anchorId }}"{% endif %}>
  12.     {% if type == 'image' and editmode %}
  13.         {{ pimcore_relation("quote_image",{
  14.             "types": ["asset"],
  15.             "subtypes": {
  16.                 "asset": ["image"]
  17.             },
  18.             "reload": true
  19.         }) }}
  20.     {% endif %}
  21.     <blockquote class="{% if type == 'highlight' %}highlight{% endif %}{% if type == 'image' %} image{% endif %}">
  22.         <div class="icon">
  23.             {% if type == 'image' %}
  24.                 {% if not pimcore_relation('quote_image').isEmpty() %}
  25.                     {{ pimcore_relation('quote_image').getElement().getThumbnail('quoteImage').getHtml() | raw }}
  26.                 {% endif %}
  27.             {% else %}
  28.                 {{ includeSvg('diverses/quotes', true, false, false) }}
  29.             {% endif %}
  30.         </div>
  31.         {{ pimcore_wysiwyg('quote_text', {
  32.         }) }}
  33.         <cite>
  34.             {{ pimcore_input('quote_input', {
  35.                 'placeholder': 'Autorname'
  36.             }) }}
  37.         </cite>
  38.     </blockquote>
  39. </div>