Ignore:
Timestamp:
2013/02/28 09:30:36 (11 years ago)
Author:
pineray
Message:

#2166 カテゴリーツリーのデータをツリー状に取得

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/Smarty/templates/default/frontparts/bloc/category.tpl

    r22206 r22586  
    2626    }); 
    2727//]]></script> 
     28 
    2829<div class="block_outer"> 
    2930    <div id="category_area"> 
    3031        <div class="block_body"> 
    3132            <h2><img src="<!--{$TPL_URLPATH}-->img/title/tit_bloc_category.gif" alt="商品カテゴリ" /></h2> 
    32             <!--{strip}--> 
    33                 <ul id="categorytree"> 
    34                     <!--{assign var=preLev value=1}--> 
    35                     <!--{assign var=firstdone value=0}--> 
    36                     <!--{section name=cnt loop=$arrTree}--> 
    37                         <!--{* 表示フラグがTRUEなら表示 *}--> 
    38                         <!--{if $arrTree[cnt].display == 1}--> 
    39                             <!--{assign var=level value=`$arrTree[cnt].level`}--> 
    40                             <!--{assign var=levdiff value=`$level-$preLev`}--> 
    41                                 <!--{if $levdiff > 0}--> 
    42                                     <ul> 
    43                                 <!--{elseif $levdiff == 0 && $firstdone == 1}--> 
    44                                     </li> 
    45                                 <!--{elseif $levdiff < 0}--> 
    46                                     <!--{section name=d loop=`$levdiff*-1`}--> 
    47                                             </li> 
    48                                         </ul> 
    49                                     <!--{/section}--> 
    50                                     </li> 
    51                                 <!--{/if}--> 
    52                             <li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id)}--> onmark<!--{/if}-->"> 
    53                                 <p> 
    54                                     <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> 
    55                                 </p> 
    56                             <!--{if $firstdone == 0}--><!--{assign var=firstdone value=1}--><!--{/if}--> 
    57                             <!--{assign var=preLev value=`$level`}--> 
    58                         <!--{/if}--> 
    59                         <!--{* セクションの最後に閉じタグを追加 *}--> 
    60                         <!--{if $smarty.section.cnt.last}--> 
    61                             <!--{if $preLev-1 > 0}--> 
    62                                 <!--{section name=d loop=`$preLev-1`}--> 
    63                                     </li> 
    64                                 </ul> 
    65                                 <!--{/section}--> 
    66                                 </li> 
    67                             <!--{else}--> 
    68                                 </li> 
    69                             <!--{/if}--> 
    70                         <!--{/if}--> 
    71                     <!--{/section}--> 
    72                 </ul> 
    73             <!--{/strip}--> 
     33            <!--{include file="`$smarty.const.TEMPLATE_REALDIR`frontparts/bloc/category_tree_fork.tpl" children=$arrTree treeID="categorytreelist"}--> 
    7434        </div> 
    7535    </div> 
Note: See TracChangeset for help on using the changeset viewer.