app/template/default/Block/top_news.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% set NewsList = repository('Eccube\\Entity\\News').getList() %}
  9. <div class="top-content-box">
  10.     <h2>カードショップマナ 新着情報</h2>
  11.     <div class="news-box">
  12.         {% for News in NewsList %}
  13.             <div class="news-smallbox">
  14.             {% if News.url %}
  15.                 <a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}>
  16.                 <div class="news-1">
  17.                     <div class="inter">
  18.                         {{ News.publish_date|date_day }}
  19.                     </div>
  20.                     <div class="">
  21.                         {{ News.title }}<span class="news-desc">{{ News.description|raw|nl2br }}</span>
  22.                     </div>
  23.                 </div>
  24.                 </a>
  25.             {% else %}
  26.                 <a href={{ url('news_detail',  {'id': News.id}) }} >
  27.                 <div class="news-1">
  28.                     <div class="inter">
  29.                         {{ News.publish_date|date_day }}
  30.                     </div>
  31.                     <div class="">
  32.                         {{ News.title }}<span class="news-desc">詳細はこちらをクリック</span>
  33.                     </div>
  34.                 </div>
  35.                 </a>
  36.             {% endif %}
  37.         </div>
  38.         {% endfor %}
  39.     
  40.     </div>
  41. </div>