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)