カテゴリーブロックを以下のように書き換えるだけ。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
; html-script: false ]<div class="bloc_outer"> <div id="category_area"> <div class="bloc_body"> <h2><img src="<!--{$TPL_URLPATH}-->img/title/tit_bloc_category.gif" alt="商品カテゴリー" /></h2> <!--{strip}--> <ul id="categorytree"> <!--{assign var=preLev value=1}--> <!--{assign var=firstdone value=0}--> <!--{section name=cnt loop=$arrTree}--> <!--{* 表示フラグがTRUEなら表示 *}--> <!--{* if $arrTree[cnt].display == 1 *}--> <!--{assign var=level value=`$arrTree[cnt].level`}--> <!--{assign var=levdiff value=`$level-$preLev`}--> <!--{if $levdiff > 0}--> <ul> <!--{elseif $levdiff == 0 && $firstdone == 1}--> </li> <!--{elseif $levdiff < 0}--> <!--{section name=d loop=`$levdiff*-1`}--> </li> </ul> <!--{/section}--> </li> <!--{/if}--> <li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id)}--> onmark<!--{/if}-->"> <p> <a href="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php?category_id=<!--{$arrTree[cnt].category_id}-->"<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id)}--> class="onlink"<!--{/if}-->><!--{$arrTree[cnt].category_name|h}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a> </p> <!--{if $firstdone == 0}--><!--{assign var=firstdone value=1}--><!--{/if}--> <!--{assign var=preLev value=`$level`}--> <!--{* /if *}--> <!--{* セクションの最後に閉じタグを追加 *}--> <!--{if $smarty.section.cnt.last}--> <!--{if $preLev-1 > 0}--> <!--{section name=d loop=`$preLev-1`}--> </li> </ul> <!--{/section}--> </li> <!--{else}--> </li> <!--{/if}--> <!--{/if}--> <!--{/section}--> </ul> <!--{/strip}--> </div> </div> </div> |
要は元のカテゴリーブロックを下記のように修正。
1 2 3 4 5 6 |
; html-script: false ]※ <!--{* 表示フラグがTRUEなら表示 *}--> ※ <!--{if $arrTree[cnt].display == 1}--> ・・・・ <!--{if $firstdone == 0}--><!--{assign var=firstdone value=1}--><!--{/if}--> <!--{assign var=preLev value=`$level`}--> ※ <!--{/if}--> |
上記の※印の3行を削除。