destoon7.0统计当前分类信息数目标签写法
destoon是非常成熟的b2b行业系统,由于其强大的扩展功效和模块。许多站长都用它来做信息类网站,也有开发者通过二次开发模板,开发出相似于destoon7.0模板58同城分类信息行业站、destoon7.0今日头条自媒体网站模板等特点网站平台。下面就为大家列举一下
destoon7.0教你在列表中统计当前分类有多少信息标签写法:
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"><div class=”crumbs”> <span class=”fr mr-10″>共寻到 <b class=”red”>{$items}</b> 条<strong class=”red”> {$CAT[catname]} </strong> 产品信息</span>
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);">{$items} 为统计当前列表的信息条数
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);">{$CAT[catname]} 为当前分类名
本办法只适合于分类列表页面使用哦。
destoon的模板里面是支撑php的代码的,因此我们可以直接在模板里面查询出来即可。
假如destoon在首页调取供给产品数目和公司、资讯数目,那么使用以下代码:
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"><ul>
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> {php $sellcount=$db->get_one(“SELECt COUNT(*) AS num FROM “.$DT_PRE.”sell WHERe status=3”);}
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> <li>共有{$sellcount[num]}条供给</li>
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> {php $company=$db->get_one(“SELECt COUNT(*) AS num FROM “.$DT_PRE.”member WHERe groupid>5”);}
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> <li>共有{$company[num]}个公司</li>
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> {php $newcount=$db->get_one(“SELECt COUNT(*) AS num FROM “.$DT_PRE.”article_21 WHERe status=3”);}
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"> <li>共有{$newcount[num]}条资讯</li>
seline; background: transparent; overflow-wrap: break-word; color: rgb(0, 0, 255);"></ul>
以上写法在7.0、6.0、5.0都应当可以使用,大家可以去试一下。但愿大家关注DT喜好者(www.destoon.org.cn),不仅有许多实惠廉价的destoon模板引荐,更有许多网站开发常用的技术分享学习。