喜欢就分享给更多人!

phpcms频道首页调用所有一级栏目及二级栏目的方法

phpcms 10-17 14:02
phpcms频道首页调用所有一级栏目及二级栏目的方法

phpcms频道首页模板index.html

你会看到:


CODE: [Copy to clipboard] <!--自定义栏目开始-->

<table width="100%" cellspacing="0" cellpadding="0">

{loop $childcats $i $cat}

{if $i%2==0}<tr>{/if}

<td valign="top" style="padding:0 5px;">

<table width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="titlebar" width="100">{$cat[catname]}</td>

<td width="10" height="25"><img src="{$skindir}/images/tit3_r.jpg"></td>

<td width="225" align="right" class="bg_titlebar"><a href="{$cat[caturl]}" class="more">更多</a>&nbsp;</td>

<td width="36"><img src="{$skindir}/images/tit2_r.jpg"></td>

</tr>

</table>


{$articlelist(0,$channelid,$cat[catid],1,0,0,10,30,0,0,0,$cat[ordertype],2,1,0,0,$cat[target],1)}


</td>

{if $i%2==1}</tr>{/if}

{/loop}

</table>

<!--自定义栏目结束--> 把他换成


CODE: [Copy to clipboard] <!--自定义栏目开始-->

<table width="100%" cellspacing="0" cellpadding="0">

{loop $childcats $i $cat}

{if $i%2==0}<tr>{/if}

<td valign="top" style="padding:0 5px;">

<table width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="titlebar" width="100">{$cat[catname]}</td>

<td width="10" height="25"><img src="{$skindir}/images/tit3_r.jpg"></td>

<td width="225" align="right" class="bg_titlebar"><a href="{$cat[caturl]}" class="more">更多</a>&nbsp;</td>

<td width="36"><img src="{$skindir}/images/tit2_r.jpg"></td>

</tr>

</table>


{loop get_childcat($channelid,$cat[catid]) $childid}

&nbsp;&nbsp;<a href="{$childid[caturl]}">{$childid[catname]}</a>

{$articlelist(0,$channelid,$childid[catid],1,0,0,10,36,0,0,0,$childcat[itemordertype],2,0,0,0,1,1)}

{/loop}

</td>

{if $i%2==1}</tr>{/if}

{/loop}

</table>

<!--自定义栏目结束-->

友情链接: 菜鸟吧源码 菜鸟聚会登录 网站目录大全 菜鸟吧导航网 冒泡网赚 中创网 福缘创业网 臭虾米项目网 小淘学社 吾图资源网 懒人之家源码 ASP300源码 折翼天使 锦尚中国 莎莎源码论坛 吾爱源码论坛 织梦58 搜虎源码论坛 游戏咖啡屋 码农网 虎格网 织梦猫 魔克吧 忽悠兄基地

网站快速入口:| 网站首页 | 用户登录 | 快捷登录 | 注册账号 | 会员中心 |