手机
当前位置:查字典教程网 >CMS教程 >phpcms >phpcms频道首页调用所有一级栏目及二级栏目
phpcms频道首页调用所有一级栏目及二级栏目
摘要:关键字描述:栏目一级二级所有调用频道首页<">width打开phpcms频道首页模板index.html你会看到:CODE:...

关键字描述:栏目 一级 二级 所有 调用 频道 首页 < " > 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频道首页调用所有一级栏目及二级栏目】相关文章:

phpcms调用文章发布时间标签显示1970的解决方法

phpcms远程图片本地化不成功及加水印功能失效的解决教程

phpcms 列表页中调用其下的所有子栏目(或特定的子栏目)的方法

phpcms v9列表页如何调用子栏目如首页>产品中心>产品类型a

phpcms的栏目缓存无限级罗列展示处理代码(亲测)

phpcms教程之用户vip过期后降低用户等级的办法分享

phpcms V9 专题的内容页面生成的html目录太深附最新的修改方法

phpcms图片频道模板制作

phpcms v9联动菜单的调用方法及get_linkage函数详解

phpcms调用全站最新文章列表的方法

精品推荐
分类导航