phpcms频道首页调用所有一级栏目及二级栏目
所属分类:
CMS教程 / phpcms
阅读数:
2007
收藏 0赞 0分享
关键字描述:栏目 一级 二级 所有 调用 频道 首页 < " > 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> </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> </td>
<td width="36"><img src="{$skindir}/images/tit2_r.jpg"></td>
</tr>
</table>
{loop get_childcat($channelid,$cat[catid]) $childid}
<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 V9 定时发布文章的实现方法
今天和大家分享下 PHPCMS V9 文章定时发布的方法,定时发布文章可以做到预约发布、自动发布,方便我们在忙的时候更新文章,保证搜索引擎的收录
收藏 0赞 0分享
phpcms v9站内外搜索代码分享
站内外搜索对一个网站有很重要的意义,接下来为大家介绍下phpcms v9实现站内外搜索的代码,感兴趣的朋友可以参考下哈
收藏 0赞 0分享
phpcms 读不到缓存 页面空白的解决方法
网站在服务器上运行正常,弄到我电脑上进入网站后台,更新缓存页面空白,访问首页还是空白。调试发现是在include/common.inc.php中执行到下面不执行了
收藏 0赞 0分享
查看更多