{#This file is part of EC-CUBECopyright(c) EC-CUBE CO.,LTD. All Rights Reserved.http://www.ec-cube.co.jp/For the full copyright and license information, please view the LICENSEfile that was distributed with this source code.#}{% set hasCategory = false %}{% set request_uri = app.request.server.get('REQUEST_URI') %}{% if 'name=' in request_uri %} {% else %} {% set hasCategory = true %}{% endif %}{% if hasCategory %}{% set RootCategory = Category.RootCategory %}{% set NewsList = repository('Eccube\\Entity\\News').getList() %}<!--現在のカテゴリID取得-->{% set now_id = app.request.query.get('category_id') %}<!--買い取り配下のカテゴリ取得-->{% set cate_childs = RootCategory.getDescendants %}<!--ルート表示--><!-- 現在カテゴリーから、親カテゴリに遡り「買い取り>ポケモンまで遡りたい」 --><!--現在カテゴリの上のカテゴリを取得 -->{% set nowparent = Category.getParent() %}{% set h = Category.hierarchy - 1 %}<!--孫カテゴリ時に子カテゴリが表示された場合は親カテゴリへ -->{% if nowparent == "シュヴァルツサイド" or nowparent == "ヴァイスサイド" %}{% set nowparent = "ヴァイスシュヴァルツ" %}{% endif %}<div class="top-content-box">{% if nowparent == "ヴァイスシュヴァルツ" or now_id == 8 or now_id == 218 %} <h2> {# use loop.first #} {% for Path in Category.path %} {% if loop.first %} {# Path.name #}ヴァイスシュヴァルツ {% endif %} {% endfor %} {# result #} に関するニュース</h2> <div class="news-box"> {% for News in NewsList %} {% if News.category_id == 8 %} {% if News.url %} <div class="news-smallbox"> <a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}> <div class="news-1"> <div class="inter"> {{ News.publish_date|date_day }} </div> <div class=""> {{ News.title }}<span class="news-desc">{{ News.description|raw|nl2br }}</span> </div> </div> </a> </div> {% else %} <div class="news-smallbox"> <a href={{ url('news_detail', {'id': News.id}) }} > <div class="news-1"> <div class="inter"> {{ News.publish_date|date_day }} </div> <div class=""> {{ News.title }}<span class="news-desc">詳細はこちらをクリック</span> </div> </div> </a> </div> {% endif %} {% endif %} {% endfor %} </div>{% else %} <h2> {# use loop.first #} {% for Path in Category.path %} {% if loop.first %} {# Path.name #}ポケモン {% endif %} {% endfor %} {# result #} に関するニュース</h2> {% for News in NewsList %} {% if News.category_id == 7 %} {% if News.url %} <div class="news-smallbox"> <a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}> <div class="news-1"> <div class="inter"> {{ News.publish_date|date_day }} </div> <div class=""> {{ News.title }}<span class="news-desc">{{ News.description|raw|nl2br }}</span> </div> </div> </a> </div> {% else %} <div class="news-smallbox"> <a href={{ url('news_detail', {'id': News.id}) }} > <div class="news-1"> <div class="inter"> {{ News.publish_date|date_day }} </div> <div class=""> {{ News.title }}<span class="news-desc">詳細はこちらをクリック</span> </div> </div> </a> </div> {% endif %} {% endif %} </div> {% endfor %}{% endif %}</div>{% endif %}