templates/blog/overview.html.twig line 1

Open in your IDE?
  1. {% extends base_layout() %}
  2. {% block content %}
  3.     <div
  4.         class="section section-default bg-white pt-5 pb-0">
  5.         {#
  6.                 {% if not editmode and not pimcore_image('publicationHeader').isEmpty() %}
  7.                     <div class="blog-image-header position-relative mb-5" style="display: flex;">
  8.                         <img src="{{ pimcore_image('publicationHeader').getThumbnail('blog-thumb') }}" class="blog-image bg-cover img-fluid w-100">
  9.         
  10.                         {% if not pimcore_input("publicationHeaderTitle").isEmpty() %}
  11.                             <div class="d-flex overlay text-center h-100">
  12.                                 <span class="m-auto">{{ pimcore_input("publicationHeaderTitle") }}</span>
  13.                             </div>
  14.                         {% endif %}
  15.                     </div>
  16.                 {% endif %}
  17.                 #}
  18.         <div class="container">
  19.             <div class="row">
  20.                 <div
  21.                     class="col-12">
  22.                     {#
  23.                                         {% if editmode %}
  24.                                             <div class="alert alert-info" role="alert">
  25.                                                 {% if editmode %}
  26.                                                     {% set message = 'Afbeelding' %}
  27.                                                     {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %}
  28.                                                 {% endif %}
  29.                     
  30.                                                 {{ pimcore_image('publicationHeader', {
  31.                                                     "width": 800,
  32.                                                     "height": 200,
  33.                                                     "thumbnail": "blog-header",
  34.                                                     "class": "img-fluid w-100"
  35.                                                 }) }}
  36.                     
  37.                                                 {% if editmode %}
  38.                                                     {% set message = 'Titel op afbeelding' %}
  39.                                                     {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %}
  40.                                                 {% endif %}
  41.                     
  42.                                                 {{ pimcore_input("publicationHeaderTitle") }}
  43.                                             </div>
  44.                                         {% endif %}
  45.                                         #}
  46.                     <div class="text-center text-black mb-5">
  47.                         <h1>
  48.                             {{ pimcore_input('heading_blogs', {
  49.                                 "placeholder" : 'page title'|trans
  50.                             }) }}
  51.                         </h1>
  52.                     </div>
  53.                     <div class="content py-2">
  54.                         {{ pimcore_wysiwyg('blogContent') }}
  55.                     </div>
  56.                     {% if blogfilters is defined %}
  57.                         {% if blogfilters|length > 0 %}
  58.                             <div class="row filters my-3 text-center">
  59.                                 <div class="col-sm-12">
  60.                                     <a class="btn btn-primary text-uppercase font-weight-bold btn-filter mb-1 active" data-filter="all">
  61.                                         <span class="text-white">
  62.                                             {{ 'Alle'|trans }}
  63.                                         </span>
  64.                                     </a>
  65.                                     {% for blogfilter in blogfilters %}
  66.                                         <a class="btn btn-primary text-uppercase font-weight-bold btn-filter mb-1" data-filter="{{ blogfilter.getId() }}">
  67.                                             <span class="text-white">
  68.                                                 {{ blogfilter.getFilterName() }}
  69.                                             </span>
  70.                                         </a>
  71.                                     {% endfor %}
  72.                                 </div>
  73.                             </div>
  74.                         {% endif %}
  75.                     {% endif %}
  76.                     {% if articles is defined %}
  77.                         <div class="articles row py-2">
  78.                             {{ include('includes/blog/article.html.twig', {
  79.                                 'articles': articles
  80.                             }) }}
  81.                         </div>
  82.                         <div class="load-more-items py-3">
  83.                             <div class="aligner">
  84.                                 <div class="loading-circle loading-bar-primary loading-bg-default mx-auto"></div>
  85.                             </div>
  86.                             <input type="hidden" class="pageCounter" value="1">
  87.                         </div>
  88.                     {% endif %}
  89.                 </div>
  90.             </div>
  91.         </div>
  92.     </div>
  93.     <script>
  94.         $('.btn-filter').click(function (e) {
  95. var filter = $(this).data('filter');
  96. var fetchUrl = $(location).attr('href');
  97. $(".btn-filter").each(function (index) {
  98. $(this).removeClass('active');
  99. });
  100. $(this).addClass('active');
  101. $.ajax({
  102. url: fetchUrl,
  103. type: 'GET',
  104. data: {
  105. filter: filter
  106. },
  107. success: function (result) {
  108. if (result.result) {
  109. $(".articles").html(result.result);
  110. $('.pageCounter').val(1);
  111. } else if (result.noresult) {
  112. $(".articles").html(result.noresult);
  113. $('.pageCounter').val(1);
  114. }
  115. }
  116. });
  117. });
  118.     </script>
  119. {% endblock %}