app/PluginData/TabaCMS/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 'default_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="ec-pageHeader"><h1 class="open_sans">{{ type.getTypeName }}</h1></div>
  17. <div class="row">
  18.     <div class="col-md-9">
  19.         <ul class="tabacms_post_list">
  20.             {% for post in post_list %}
  21.             <li class="row">
  22.                 <div class="col-md-4">
  23.                     <time>
  24.                         {{ post.getPublicDate|date('Y/m/d') }}
  25.                     </time>
  26.                     {% if post.getCategory is not empty %}
  27.                     <label class="text-nowrap tabacms_category_{{ post.getType.getDataKey }}_{{ post.getCategory.getDataKey }}" {{ post.getCategory.getTagAttributes|raw }}>{{ post.getCategory.getCategoryName }}</label>
  28.                     {% endif %}
  29.                 </div>
  30.                 <div class="col-md-8">
  31.                     {% if post.getContentDiv == constant('CONTENT_DIV_BODY',post) %}
  32.                     <a href="{{ post.getURI }}"><strong>{{ post.getTitle }}</strong></a>
  33.                     {% elseif post.getContentDiv == constant('CONTENT_DIV_LINK',post) %}
  34.                     <a href="{{ post.getLinkUrl }}" {% if post.getLinkTarget %} target="{{ post.getLinkTarget }}" {% endif %}><strong>{{ post.getTitle }}</strong></a>
  35.                     {% elseif post.getContentDiv == constant('CONTENT_DIV_TITLE',post) %}
  36.                     <strong>{{ post.getTitle }}</strong>
  37.                     {% endif %}
  38.                 </div>
  39.             </li>
  40.             {% endfor %}
  41.         </ul>
  42.         {% if post_list.totalItemCount > 0 %}
  43.         {% include "pager.twig" with {'pages':post_list.paginationData} %}
  44.         {% endif %}
  45.     </div>
  46.     <div class="col-md-3">
  47.         {{ TabaCMSWidget('search')|raw }}
  48.         {{ TabaCMSWidget('category')|raw }}
  49.         {{ TabaCMSWidget('tag')|raw }}
  50.     </div>
  51. </div>
  52. {% endblock %}