打开帝国后台,新建一个栏目,简历一个封面模板为 abc,套用一个封面栏目. [e:loop={"select * from {$dbtbpre}enewsclass where classid in(34) order by myorder,classid desc",0,24,0}] 1.<?=$bqr[classid]?><br /> 栏目ID 2.<?=$bqr[bclassid]?><br /> 父栏目ID 3.<?=$bq
以下代码演示帝国导航调用 栏目id为14.15.2.34的栏目内容.同时加入php语句,如果栏目显示为当前栏目,则变量<?=$on?> 显示为 an ,否则就显示为空 [e:loop={"select classid,classname,classpath,bname from {$dbtbpre}enewsclass where classid in(14,15,2,34) order by myorder,classid desc",0,24,0}] <?php
[e:loop={"select * from {$dbtbpre}enewsclass where classid in (82,83,86,87,88,89,90,91,93) order by myorder asc",0,24,0}] <li><a href="<?=$bqsr[classurl]?>"><?=$bqr[classname]?></a></li> [/e:loop] 排列
统计记录:(如:select count(*) as total from phome_ecms_news where classid=1 and checked=1) 注:这句SQL的意思是查找统计位于数据表phome_ecms_news 新闻数据表的栏目id=1和审核过的信息总数 在我们平时用的栏目模板里面 就是 本栏目一共有xxx条信息. xxx就是用这个SQL统计出来的. 查询记录:(如:select * from phome_ecms_news where classid=1