国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > php开源 > DedeCMS > phpcms在首页动态调用3级分类的方法

phpcms在首页动态调用3级分类的方法

来源:程序员人生   发布时间:2014-03-18 16:33:11 阅读次数:2069次

  网(LieHuo.Net)教程 phpcms在首页动态调用3级分类的方法,大家一直很想要吧,经过本人研究,终于实现了,现在特别把方法分享给大家,直接上代码:

以下为引用的内容:
<div style="padding:8px;"><div>
{loop $CATEGORY $t $c}
{if $c[module]=='yp' & $c[child]==1}
{if !$c[parentid]}
<div>
<div style="width:47%; float:left; margin-left:8px; margin-right:4px;"><div style="line-height:30px;"><img src="{SKIN_PATH}images/i_jc.gif" border="0" /> <a href="{PHPCMS_PATH}yp/company.php?catid={$c[catid]}"><strong><font color="#fd7d00">{$c[catname]}</font></strong></a></div>
<div style=" border-bottom:1px dotted #B5CCE3; line-height:25px;">
{loop $CATEGORY $z $zc}
{if $zc[parentid] && $zc[parentid]==$c[catid]}<nobr><font color="#CCCCCC">|</font> <a href="{PHPCMS_PATH}yp/company.php?catid={$zc[catid]}"><strong><font color="#3366FF">{$zc[catname]}</font></strong></a></nobr>
<!--//////////////////////////////////////////////////////////////////////////// **循环-->
<div style=" border-bottom:1px dotted #B5CCE3; line-height:25px;">
{loop $CATEGORY $y $ye}
{if $ye[parentid] && $ye[parentid]==$zc[catid] }<nobr><font color="#CCCCCC">|</font> <a href="{PHPCMS_PATH}yp/company.php?catid={$ye[catid]}">{$ye[catname]}</a></nobr>{/if}
{/loop}
</div>
<!--////////////////////////////////////////////////////////////////////////////////// -->

{/if}
{/loop}
</div>
</div>
</div>
{/if}
{/if}
{/loop}
</div>
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生