12.2 循环子栏目+信息
来源:网络作者:站长
<?php $bclassid='8'; ?> <div class="md_box"> <ul id="tabs">[e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=$bclassid order by myorder,classid asc",0,24,0}] <li <?if($bqno==1){echo 'class="tabs-current"';}?>><?=$bqr['classname']?></li>[/e:loop]</ul> <div id="tabs-content" class="md_list"> [e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=$bclassid order by myorder,classid asc",0,24,0}] [ecmsinfo] $bqr[classid],8,0,1,1,13,1,0,0[/ecmsinfo] [/e:loop] </div> </div>
语法:
[ecmsinfo]栏目ID,显示条数,标题截取数,是否显示栏目名,操作类型,模板ID,只显示有标题图片,附加SQL条件,显示排序[/ecmsinfo]
增加一个模板标签ID13
页面模板内容
<section class="tabs-box"> <ul> [!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--] </ul> </section>
列表内容模板:
$listtemp=' <li><a href="[!--titleurl--]" target="_blank"><i class="md_img"><img src="[!--titlepic--]"></i><div class="desc"><h3>[!--title--]</h3><div class="local">'.$class_r[$r[classid]]['classname'].'</div> <p class="meta"><span>特点:</span>[!--smalltext--]</p> <p class="price"><i>¥价格:</i> <span>[!--price--]</span>起</p></div><p class="rain-bow c_orange">精选</p> </a></li>';
你觉得文章内容怎么样