app/Plugin/TabaCMS2/Resource/template/default/list.twig line 1

Open in your IDE?
  1. {#
  2. Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
  3. For the full copyright and license information, please view the LICENSE
  4. file that was distributed with this source code.
  5. #}
  6. {% extends 'lower_frame.twig' %}
  7. {# 投稿リストの取得 #}
  8. {% set post_list = TabaCMSPostList() %}
  9. {% block javascript %}
  10. {{ TabaCMSAsset('script.js','script')|raw }}
  11. {% endblock javascript %}
  12. {% block stylesheet %}
  13. {{ TabaCMSAsset('style.css','style')|raw }}
  14. {% endblock stylesheet %}
  15. {% block main %}
  16. <div class="container-lg">
  17.     <div class="row">
  18.         <div class="col-12">
  19.             <div class="ec-pageHeader"><h1>{{ type.getTypeName }}</h1></div>
  20.         </div>
  21.     </div>
  22.     <div class="row">
  23.         <div class="col-12 col-md-9">
  24.             <ul class="tabacms_post_list">
  25.                 {% for post in post_list %}
  26.                 <li class="row">
  27.                     <div class="col-12 col-md-4">
  28.                         <time>
  29.                             {{ post.getPublicDate|date('Y/m/d') }}
  30.                         </time>
  31.                         {% if post.getCategory is not empty %}
  32.                         <label class="text-nowrap tabacms_category_{{ post.getType.getDataKey }}_{{ post.getCategory.getDataKey }}" {{ post.getCategory.getTagAttributes|raw }}>{{ post.getCategory.getCategoryName }}</label>
  33.                         {% endif %}
  34.                     </div>
  35.                     <div class="col-12 col-md-8">
  36.                         {% if post.getContentDiv == constant('CONTENT_DIV_BODY',post) %}
  37.                         <a href="{{ post.getURI }}"><strong>{{ post.getTitle }}</strong></a>
  38.                         {% elseif post.getContentDiv == constant('CONTENT_DIV_LINK',post) %}
  39.                         <a href="{{ post.getLinkUrl }}" {% if post.getLinkTarget %} target="{{ post.getLinkTarget }}" {% endif %}><strong>{{ post.getTitle }}</strong></a>
  40.                         {% elseif post.getContentDiv == constant('CONTENT_DIV_TITLE',post) %}
  41.                         <strong>{{ post.getTitle }}</strong>
  42.                         {% endif %}
  43.                     </div>
  44.                 </li>
  45.                 {% endfor %}
  46.             </ul>
  47.             {% if post_list.totalItemCount > 0 %}
  48.             {% include "pager.twig" with {'pages':post_list.paginationData} %}
  49.             {% endif %}
  50.         </div>
  51.         <div class="col-12 col-md-3">
  52.             {{ TabaCMSWidget('search')|raw }}
  53.             {{ TabaCMSWidget('category')|raw }}
  54.             {{ TabaCMSWidget('tag')|raw }}
  55.         </div>
  56.     </div>
  57. </div>
  58. {% endblock %}