templates/Snippets/download-item.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ include('Layout/includes/css.html.twig') }}
  3.     {{ include('Layout/includes/encore.html.twig', {
  4.         'staticDebugMode': staticDebugMode,
  5.         'file': 'js/content'
  6.     }) }}
  7.     <div class="editmode-box editmode-box--info mb-5 text-left">
  8.         <div class="editmode-box__header">Settings</div>
  9.         <div>
  10.             <strong>Image</strong>
  11.             {{ pimcore_image('download-image', {width: 250}) }}
  12.             <strong>Title</strong>
  13.             {{ pimcore_input('download-title') }}
  14.             <strong>Asset</strong>
  15.             {{ pimcore_relation('download-asset', {
  16.                 "types": ["asset"],
  17.             }) }}
  18.         </div>
  19.     </div>
  20. {% endif %}
  21. {% if not  pimcore_relation('download-asset').empty  %}
  22.     <section>
  23.         {{ include('Renderlet/downloadItem.html.twig', {
  24.             'file': getPathInfo(pimcore_relation('download-asset').element.filename),
  25.             'image': not pimcore_image('download-image').empty ? pimcore_image('download-image').thumbnail('download-list-item') : pimcore_relation('download-asset').element.fullPath,
  26.             'href': path('app_asset_download', {id: pimcore_relation('download-asset').element.id }),
  27.             'text': not pimcore_input('download-title').empty ? pimcore_input('download-title').data : pimcore_relation('download-asset').element.filename,
  28.             'fileSize': pimcore_relation('download-asset').element.fileSize(true),
  29.             'viewLink': pimcore_relation('download-asset').element.fullPath
  30.         }) }}
  31.     </section>
  32. {% endif %}