帝国ECMS6.5灵动标签汇集

<pre name="code" class="php">0、先来标准的loop灵动标签说明
[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]
1、调用相同作者发布的信息
[e:loop={"news",5,18,0,"userid='".$navinfor[userid]."' and ismember=1",""}]
2、调用相同标题分类的信息
[e:loop={"selfinfo",5,0,0,"ttid='$navinfor[ttid]'",""}]
3、调用相同父栏目的信息
[e:loop={$class_r[$GLOBALS[navclassid]][bclassid],5,0,0,"",""}]
4、调用当前栏目的下级栏目列表
[e:loop={"select * from [!db.pre!]enewsclass where bclassid='$GLOBALS[navclassid]'",10,24,0,"",""}]
5、调用当前栏目的同级栏目列表
[e:loop={"select * from [!db.pre!]enewsclass where bclassid='".$class_r[$GLOBALS[navclassid]][bclassid]."'",10,24,0,"",""}]
6、调用上级栏目的同级栏目列表
<?php
$bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
$bbclassid=$class_r[$bclassid][bclassid];
?>
[e:loop={"select * from [!db.pre!]enewsclass where bclassid='$bbclassid'",10,24,0,"",""}]
7、调用上上级栏目的同级栏目列表
[e:loop={"select * from [!db.pre!]enewsclass where bclassid='".$class_r[$GLOBALS[navclassid]]."'",10,24,0,"",""}]
8、调用上一级父栏目名,直接加到loop中即可,栏目ID同理
<?php
$bclassid=$class_r[$bqr[classid]]['bclassid'];
$bclassname=$class_r[$bclassid][classname];
echo $bclassname;
?>
父栏目名:<?=$bclassname?>
9、调用上上一级父栏目ID、栏目名、链接,直接加到loop中即可
<?php
$bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
$bbclassid=$class_r[$bclassid][bclassid];
?>
父栏目ID:<?=$bbclassid?>
父栏目名:<?=$class_r[$bbclassid][classname];?>
父栏目链接:<a href="/e/public/ClassUrl?classid=<?=$bbclassid?>"> <?=$class_r[$bbclassid][classname];?> </a>

0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论