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

Open in your IDE?
  1. {% set sidebar_type = 0 %}
  2. {% set sub_title_type = 0 %}
  3. {# 商品一覧からの場合 #}
  4. {% if Category is defined %}
  5. {% if Category is not null %}
  6.     {% for Path in Category.path %}
  7.         {% if Path.hierarchy == 1 %}
  8.             {% if Path.name == '部品' %}
  9.                 {% set sidebar_type = 1 %}
  10.             {% endif %}
  11.             {% if Path.name == 'カートリッジ' %}
  12.                 {% set sidebar_type = 2 %}
  13.             {% endif %}
  14.             {#{% if Path.name == '浄水器本体' %}#}
  15.             {#    {% set sidebar_type = 3 %}#}
  16.             {#{% endif %}#}
  17.             {% if Path.name == 'マルチピュア浄水器商品' %}
  18.                 {% set sidebar_type = 3 %}
  19.             {% endif %}
  20.         {% endif %}
  21.         {% if Path.hierarchy == 2 %}
  22.             {% if Path.name == 'カウンタートップタイプ浄水器' %}
  23.                 {% set sidebar_type = 3 %}
  24.             {% endif %}
  25.             {% if Path.name == 'ビルトイン浄水器' %}
  26.                 {% set sidebar_type = 4 %}
  27.             {% endif %}
  28.             {% if Path.name == 'レンタル浄水器' %}
  29.                 {% set sidebar_type = 5 %}
  30.             {% endif %}
  31.         {% endif %}
  32.     {% endfor %}
  33. {% endif %}
  34. {% endif %}
  35. {#{{ url(eccube_config.eccube_user_data_route, {'route': 'builtin_select01'}) }}#}
  36. {#{{ path(eccube_config.eccube_user_data_route, {'route': 'builtin_select01'}) }}#}
  37. {% set current_url = path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}
  38. {# 浄水器本体から選ぶ #}
  39. {% if current_url == path(eccube_config.eccube_user_data_route, {'route': 'builtin_select01'})  %}
  40.     {% set sidebar_type = 4 %}
  41.     {% set sub_title_type = 1 %}
  42. {% endif %}
  43. {# 水栓から選ぶ #}
  44. {% if current_url == path(eccube_config.eccube_user_data_route, {'route': 'builtin_select02'})  %}
  45.     {% set sidebar_type = 4 %}
  46.     {% set sub_title_type = 1 %}
  47. {% endif %}
  48. {# すでに水栓をお持ちの場合 #}
  49. {% if current_url == path(eccube_config.eccube_user_data_route, {'route': 'builtin_select03'})  %}
  50.     {% set sidebar_type = 4 %}
  51.     {% set sub_title_type = 0 %}
  52. {% endif %}
  53. <style>
  54. /*全てに適用*/
  55.     .bgImg {
  56. {% if sidebar_type == 3 %}
  57.         background-size: cover;
  58. /*        background-image: url('/html/user_data/img/catch.png');*/
  59.         background-image: url('/html/user_data/img/list_header/CounterTop.png');
  60.         background-position: center top;
  61. {% endif %}
  62. {% if sidebar_type == 4 %}
  63.         background-size: cover;
  64. /*        background-image: url('/html/user_data/img/builtin.png');*/
  65.         background-image: url('/html/user_data/img/list_header/Buitin.png');
  66.         background-position: center top;
  67. {% endif %}
  68. {# 部品の場合 #}
  69. {% if sidebar_type == 1 %}
  70.         background-size: cover;
  71.         background-image: url('/html/user_data/img/parts.png');
  72.         background-position: center center;
  73. {% endif %}
  74. {# カートリッジの場合 #}
  75. {% if sidebar_type == 2 %}
  76.         background-size: cover;
  77.         background-image: url('/html/user_data/img/cartridge.png');
  78.         background-position: center center;
  79. {% endif %}
  80.         background-color: #ebf0f0;
  81.         text-align: center;
  82.         color: #1266ac;
  83.         font-size: 30px;
  84.         line-height: 1.5;
  85.         font-weight: bold;
  86.         padding: 30px 0;
  87.         margin-bottom: 50px;
  88.         /* width: 100%;*/
  89.         height: 606px;
  90. {% if sidebar_type > 0 %}
  91. {% endif %}
  92.     }
  93.     .l_purchase_title h1 {
  94.     }
  95.     .stit{
  96.         font-size: 14px;
  97.         color: #000 !important;        
  98.     }
  99.     .stit a {
  100.         text-decoration: none;
  101.         transition: all 0.8s;
  102.         color: #000;
  103.     }
  104. /*ウィンドウ幅が767px以上の場合に適用*/
  105. @media screen and (min-width: 767px) { 
  106.     }
  107. /*ウィンドウ幅が最大767pxまでの場合に適用*/
  108. @media screen and (max-width: 767px) { 
  109.     }
  110. </style>
  111. <div style="position:relative; top:0px;">
  112. {% if sidebar_type == 3 %}
  113. {#<img style="width:100%" src="/html/user_data/catch3.png">#}
  114. <img style="width:100%" src="/html/user_data/img/list_header/CounterTop.png">
  115. {% endif %}
  116. {% if sidebar_type == 4 %}
  117. {#<img style="width:100%" src="/html/user_data/img/builtin3.png">#}
  118. <img style="width:100%" src="/html/user_data/img/list_header/Buitin.png">
  119. {% endif %}
  120. {# 部品の場合 #}
  121. {% if sidebar_type == 1 %}
  122. <img style="width:100%" src="/html/user_data/img/parts3.png">
  123. {% endif %}
  124. {# カートリッジの場合 #}
  125. {% if sidebar_type == 2 %}
  126. <img style="width:100%" src="/html/user_data/img/cartridge3.png">
  127. {% endif %}
  128. {% if sidebar_type == 5 %}
  129. <img style="width:100%" src="/html/user_data/catch3.png">
  130. {% endif %}
  131. {% if sidebar_type == 0 %}
  132. <img style="width:100%" src="/html/user_data/catch3.png">
  133. {% endif %}
  134. {#<img class="bgImg" style="width:100%" src="/html/user_data/catch3.png">#}
  135. <div style="width:80%;position:absolute; text-align:center; left:50%; top:45%;-ms-transform: translate(-50%,-45%); -webkit-transform: translate(-50%,-45%); transform: translate(-50%,-45%); margin:0; padding:0;">
  136. <p style="color:#707070; font-size:90%;">ONLINE SHOP</p>
  137. {#<h1 style="color:#1266ac; font-size:200%;">マルチピュア浄水器商品一覧#}
  138. <h1 style="color:#1266ac; font-size:200%;">
  139. {% if sidebar_type == 3 %}
  140. カウンタートップ浄水器
  141. {% endif %}
  142. {% if sidebar_type == 4 %}
  143. ビルトイン浄水器
  144. {% endif %}
  145. {# 部品の場合 #}
  146. {% if sidebar_type == 1 %}
  147. 部品一覧
  148. {% endif %}
  149. {# カートリッジの場合 #}
  150. {% if sidebar_type == 2 %}
  151. 交換カートリッジ
  152. {% endif %}
  153. {% if sidebar_type == 5 %}
  154. レンタル浄水器
  155. {% endif %}
  156. {% if sidebar_type == 0 %}
  157. {% if Category is defined %}
  158.     {# 商品一覧からの場合 #}
  159.     {% if Category is not null %}
  160.         {% for Path in Category.path %}
  161.             {% if loop.last %}
  162.                 {{ Path.name }}
  163.             {% endif %}
  164.         {% endfor %}
  165.     {% endif %}
  166. {% endif %}
  167. {% if Product is defined %}
  168.     {# 商品詳細からの場合 #}
  169.     {% if Product.ProductCategories is not empty %}
  170.         {% for ProductCategory in Product.ProductCategories %}
  171.             {% for Path in ProductCategory.Category.path %}
  172.                 {% if loop.last %}
  173.                     {{ Path.name }}
  174.                 {% endif %}
  175.             {% endfor %}
  176.         {% endfor %}
  177.     {% endif %}
  178. {% endif %}
  179. {% endif %}
  180. </h1>
  181. {% if sub_title_type == 1 %}
  182. <br />
  183. <h2 style="font-weight:bold;">
  184. キッチンの上に本体を置き、ご自身でお手軽に取り付けられるタイプ
  185. </h2>
  186. {% endif %}
  187. </div>
  188. </div>