templates/areas/article/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <style>
  3.         .article-edit-box,
  4.         .editor-checkbox label {
  5.             color: #fff;
  6.         }
  7.     </style>
  8.     <div class="main-article-area">
  9.         {{ pimcore_input("title", {
  10.             "placeholder": 'Cím',
  11.             "class": "article-edit-title"
  12.         }) }}
  13.         <div style="display: flex; align-items: center; margin-bottom: 25px">
  14.             <label class="pimcore-edit-label">Cím igazítása: </label>
  15.             {{ pimcore_select("title_align", {
  16.                 "store": [
  17.                     ["left", "Balra"],
  18.                     ["center", "Középre"],
  19.                 ],
  20.                 "defaultValue" : "left"
  21.             }) }}
  22.         </div>
  23.         <div style="display: flex; align-items: center; margin-bottom: 25px">
  24.             <label class="pimcore-edit-label">Cím utáni távolság: </label>
  25.             {{ pimcore_select("title_padding", {
  26.                 "store": [
  27.                     ["small", "Kicsi"],
  28.                     ["medium", "Közepes"],
  29.                     ["big", "Nagy"],
  30.                 ],
  31.                 "defaultValue" : "small"
  32.             }) }}
  33.         </div>
  34.         <div class="article-area-checkbox-container">
  35.             {{ pimcore_checkbox('contentEmbed', {
  36.                 'reload': true,
  37.                 'class': 'editor-checkbox',
  38.                 'label': 'Beágyazott tartalom '
  39.             }) }}
  40.             <span title="A jelölőnégyzet használatával a szerkesztő tartalma elveszik.">ℹ️</span>
  41.         </div>
  42.         {% if pimcore_checkbox('contentEmbed').isChecked() %}
  43.             <div class="article-area-embed-container">
  44.                 {{ pimcore_textarea('embedContent', {
  45.                     "height": "200",
  46.                     "placeholder": "Beágyazott tartalom",
  47.                     "class": "article-edit-box"
  48.                 }) }}
  49.             </div>
  50.         {% else %}
  51.             {{ pimcore_wysiwyg("content", {
  52.                 "height": 200,
  53.                 "placeholder": "Szöveg",
  54.                 "class": "article-edit-box"
  55.             }) }}
  56.         {% endif %}
  57.         <div class="article-images-container">
  58.             <h3>Képek</h3>
  59.             {% for i in pimcore_block('article-images-top').iterator %}
  60.                 {{ pimcore_image("article-image-top", { "class": "w-max-100-percent" }) }}
  61.             {% endfor %}
  62.         </div>
  63.         <div>
  64.             <h3>Apple link</h3>
  65.             {{ pimcore_link('dld_apple') }}
  66.             <h3>Google link</h3>
  67.             {{ pimcore_link('dld_google') }}
  68.         </div>
  69.         {{ pimcore_wysiwyg("contentFooter", {
  70.             "height": 200,
  71.             "placeholder": "Szöveg",
  72.             "class": "article-edit-box"
  73.         }) }}
  74.     </div>
  75.     <div class="article-images" style="background-color: #fff !important;">
  76.         <h3>KÉPEK</h3>
  77.         {% for i in pimcore_block('article-images').iterator %}
  78.             <p>Link:<br>{{ pimcore_link('link', {'required': 'linkonly'}) }}</p>
  79.             <p>Kép:<br>{{ pimcore_image('image', {'required': true}) }}</p>
  80.             <hr>
  81.         {% endfor %}
  82.     </div>
  83. {% else %}
  84.     {% set title = pimcore_input("title") %}
  85.     {% set content = pimcore_wysiwyg("content") %}
  86.     {% set contentFooter = pimcore_wysiwyg("contentFooter") %}
  87.     {% set titleAlign = pimcore_select('title_align') %}
  88.     {% set titlePadding = pimcore_select('title_padding') %}
  89.     <div class="main-article-area">
  90.         {% if title and title.getText() %}
  91.             {% set align = 'left' %}
  92.             {% set padding = 'small' %}
  93.             {% if titleAlign and titleAlign.getData() %}
  94.                 {% set align = titleAlign.getData() %}
  95.             {% endif %}
  96.             {% if titlePadding and titlePadding.getData() %}
  97.                 {% set padding = titlePadding.getData() %}
  98.             {% endif %}
  99.             <h1 class="title-padding-{{ padding }}" style="text-align: {{ align }}">{{ title.render() | raw }}</h1>
  100.         {% endif %}
  101.         
  102.         {% if pimcore_checkbox('contentEmbed').isChecked() %}
  103.             {{ pimcore_textarea('embedContent', {
  104.                 "htmlspecialchars": false
  105.             }) }}
  106.         {% else %}
  107.             {% if content and not content.isEmpty() %}
  108.                 {{ content.render() | raw }}
  109.             {% endif %}
  110.         {% endif %}
  111.         {% set articleImagesTop = pimcore_block('article-images-top') %}
  112.         {% if articleImagesTop and articleImagesTop.getCount() %}
  113.             <div class="justify-content-center">
  114.                 {% for i in articleImagesTop.iterator %}
  115.                     {% set image = pimcore_image('article-image-top') %}
  116.                     {% if image and image.getImage() %}
  117.                         <div class="col d-flex justify-content-center m-3">
  118.                             {{ image.getImage().getThumbnail('seiko_srticle_top').getHtml() | raw }}
  119.                         </div>
  120.                     {% endif %}
  121.                 {% endfor %}
  122.             </div>
  123.         {% endif %}
  124.         {% if not pimcore_link('dld_apple').isEmpty() and not pimcore_link('dld_google').isEmpty() %}
  125.             <div class="store-button-container">
  126.                 <div class="store-button-wrapper">
  127.                     <div class="store-button">
  128.                         {{ pimcore_link('dld_apple', {
  129.                             'textPrefix': '<img src="/themes/frontend/images/apple-logo.png" alt="">'
  130.                         }) }}
  131.                     </div>
  132.                     <div class="store-button">
  133.                         {{ pimcore_link('dld_google', {
  134.                             'textPrefix': '<img src="/themes/frontend/images/google-play.png" alt="">'
  135.                         }) }}
  136.                     </div>
  137.                 </div>
  138.             </div>
  139.         {% endif %}
  140.         {% if contentFooter and not contentFooter.isEmpty() %}
  141.             {{ contentFooter.render() | raw }}
  142.         {% endif %}
  143.     </div>
  144.     {% set articleImages = pimcore_block('article-images') %}
  145.     {% if articleImages and articleImages.getCount() %}
  146.         <div class="row article-images justify-content-center">
  147.             {% for i in articleImages.iterator %}
  148.                 {% set image = pimcore_image('image') %}
  149.                 {% if image and image.getImage() %}
  150.                     <div class="col d-flex justify-content-center m-3">
  151.                         {% if pimcore_link('link').isEmpty() %}
  152.                             {{ image.getImage().getThumbnail('seiko_article').getHtml() | raw }}
  153.                         {% else %}
  154.                             {{ pimcore_link('link', {
  155.                                 'noText': true,
  156.                                 'textPrefix': image.getImage().getThumbnail('seiko_article').getHtml() | raw
  157.                             }) }}
  158.                         {% endif %}
  159.                     </div>
  160.                 {% endif %}
  161.             {% endfor %}
  162.         </div>
  163.     {% endif %}
  164. {% endif %}