广告
返回顶部
首页 > 资讯 > 后端开发 > PHP编程 >phpcms频道首页调用所有一级栏目及二级栏目
  • 952
分享到

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

栏目一级二级所有调用频道首页<">width 2022-06-12 01:06:25 952人浏览 薄情痞子
摘要

关键字描述:栏目 一级 二级 所有 调用 频道 首页 < " > width 打开PHPcms频道首页模板index.html你会看到:CODE: [Copy to clipboard] <!--

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

<!--自定义栏目结束--> 具体怎么做的美观点大家自由发挥了~~

--结束END--

本文标题: phpcms频道首页调用所有一级栏目及二级栏目

本文链接: https://www.lsjlt.com/news/31644.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作