欢迎来到工商注册核名查询系统!

phpcms

当前位置:主页 > CMS教程 > phpcms >

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

来源:本站原创|时间:2022-11-25|栏目:phpcms|

关键字描述:栏目 一级 二级 所有 调用 频道 首页 < " > width

打开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>
<!--自定义栏目结束--> 具体怎么做的美观点大家自由发挥了~~

更多phpcms

您可能感兴趣的文章

阅读排行

本栏相关

随机阅读

网页制作CMS教程网络编程软件编程脚本语言数据库服务器

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:835971066 | 邮箱:835971066#qq.com(#换成@)

Copyright © 2002-2020 工商注册核名查询系统 版权所有