templates/partials/_news-card.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <style>
  3.         .news-card .pimcore_editable_link { position: absolute; right: 38px; top: -28px; }
  4.         .news-card .pimcore_editable_link_text { display: none; }
  5.     </style>
  6. {% endif %}
  7. {% if editmode %}
  8.     <span class="news-card card h-100">
  9.     {{ pimcore_link('nc-link') }}
  10. {% else %}
  11.     <a class="news-card card h-100" href="{{ pimcore_link('nc-link').getHref() }}">
  12. {% endif %}
  13.     {{ pimcore_image("nc-image", { class: 'card-img-top' }) }}
  14.     <div class="card-body">
  15.         {% if pimcore_input('nc-subline') is not empty %}<span class="news-card-subline d-block">{{ pimcore_input('nc-subline') }}</span>{% endif %}
  16.         <h3 class="news-card-title m-0">{{ pimcore_input('nc-title') }}</h3>
  17.         {% if pimcore_wysiwyg('nc-text') is not empty %}
  18.             <p class="mt-3 mb-0">
  19.                 {{ pimcore_wysiwyg('nc-text', {
  20.                     enterMode: 2,
  21.                     placeholder: 'Optionaler zusätzlicher Text',
  22.                     'toolbarGroups': [
  23.                         {
  24.                             'name': 'basicstyles',
  25.                             'groups': [ 'basicstyles' ]
  26.                         }
  27.                     ]
  28.                 }) }}
  29.             </p>
  30.         {% endif %}
  31.     </div>
  32. {% if editmode %}</span>{% else %}</a>{% endif %}