这篇内容主要试用ECMS6.5,往后的版本就出来测试了:

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>

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!

原文地址:帝国ECMS6.5灵动标签汇集发布于2023-03-30 20:03:51

相关推荐