網(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> |