标签:des style color io ar sp div c on
下面的一种方法可以实现,三个分类名分别代表
一级分类名:{$m[catname]}
二级分类名:{$c[catname]}
三级分类名:{$b[catname]}
{loop $maincat $i $m}
{php $child = get_maincat($maincat, $CATEGORY, 1);}
<div class="hq01">
<div class="hq-tt">
<p><h4>{$m[catname]}</h4>
{php $a = get_maincat($m[catid], $CATEGORY, 1);}
{loop $a $g}
{php $f = get_maincat($g[catid], $CATEGORY, 1);}
{loop $f $i $b}
<span><a href="{$MOD[linkurl]}{$c[linkurl]}">{$b[catname]}</a></span>
{/loop}
{/loop}
<span class="hqmore"><a href="{$MOD[linkurl]}{$m[linkurl]}">[更多]</a></span> </p> </div>
<div class="clear">
</div>
{php $childs = get_maincat($m[catid], $CATEGORY, 1);}
{loop $childs $i $c}
<div class="hq-cc">
<!--{php $tags=tag("moduleid=$moduleid&condition=status=3&areaid=$cityid&length=40&catid=".$c[catid]."&order=".$MOD[order]."&pagesize=5&datetype=2&target=_blank&template=null")}-->
<ul>
<li class="li-t"><span><a href="{$MOD[linkurl]}{$c[linkurl]}">---更多</a></span>{$c[catname]}</li>
{loop $tags $t}
<li><!-- <span class="f_r">{date(‘Y-m-d‘, $t[addtime])} </span> -->
<a href="{$t[linkurl]}"{if $target} target="{$target}"{/if}>{$t[title]}</a>
</li>
{/loop}
</ul>
</div>
{/loop}
<div class="clear"></div> </div> <div class="clear"></div> {/loop}
标签:des style color io ar sp div c on
原文地址:http://www.cnblogs.com/wt645631686/p/4004971.html