帝国CMS灵动标签循环子栏目数据,同时调用点击排行及最新信息,当然也可以是其它两种信息调用,如下图为例:
如上图所示,左边调用点击排行,右边调用最新信息。
代码如下:
<div class="intabbk" id="shtree1"><h3></h3><span class="more"><a href="[!---news.url--]list-1-0.html" target="_blank">更多>></a></span><div id="tab-hd" class="deep-hd">[showclasstemp]1,13,0,0[/showclasstemp]</div><div id="tab-bd" class="deep-bd">[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='1' order by myorder asc ",7,24,0}]<div class="dcon"><div class="topl"><div class="top10"><b>销售排行</b>TOP10</div><?php//这里是取得该分类下的有图片的最新数据$newbook1=$empire->query("select title,titlepic,titleurl,keyboard,newstime,groupid,tprice,price,classid,newspath,filename,id from phome_ecms_shop where classid =".$bqr[classid]." order by onclick desc limit 6");while($r=$empire->fetch($newbook1)) {$commbookurl=sys_ReturnBqTitleLink($commbook1);?><dl><dt><a href="<?=sys_ReturnBqTitleLink($r)?>" target="_blank"><img src="<?=$r[titlepic]?>" width="60" height="60" /></a></dt><dd><a href="<?=sys_ReturnBqTitleLink($r)?>" target="_blank"><?=$r[title]?></a></dd><dd><span class="price">市价:<?=$r[tprice]?></span></dd><dd><span class="priceb">售价:<?=$r[price]?></span></dd></dl><?php } ?><div class="go"><a href="[!---news.url--]list-1-0.html" target="_blank">进入进口食品>></a></div></div><div class="goodsbk"><ul class="goods_list"><?php $newbook=$empire->query("select title,titlepic,titleurl,keyboard,newstime,groupid,tprice,price,classid,newspath,filename,id from phome_ecms_shop where classid =".$bqr[classid]." order by newstime desc limit 8"); while($r=$empire->fetch($newbook)) { ?><li><div class="pic_wrap"><a href="<?=sys_ReturnBqTitleLink($r)?>" target="_blank"><img alt="<?=$r[title]?>" src="<?=$r[titlepic]?>"></a></div><div class="price_wrap"><p class="price"><span>¥</span><?=$r[price]?></p></div><div class="title_wrap"><a title="<?=$r[title]?>" href="<?=sys_ReturnBqTitleLink($r)?>" target="_blank"><?=$r[title]?></a></div></li> <?php } ?> </ul></div> </div> [/e:loop]</div>
未经允许不得转载:Just My Socks中文教程网 » 帝国CMS灵动标签循环子栏目数据 同时调用点击排行及最新信息