首页 > 教程 > 帝国CMS > 灵动标签调用当前栏目,二级栏目,三级栏目和动态页面调用栏目方法汇总
灵动标签调用当前栏目,二级栏目,三级栏目和动态页面调用栏目方法汇总
ECMSPLUS | 2020-11-16
|
摘要:灵动标签调用当前栏目,二级栏目,三级栏目和动态页面调用栏目方法汇总...
灵动标签调用当前栏目,二级栏目,三级栏目和动态页面调用栏目方法汇总
动态页面PHP调用栏目
<?phpFvjECMSPLUS
$sql=$empire->query("select classid,classname,classpath,wburl from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder limit 11");FvjECMSPLUS
while($r=$empire->fetch($sql)) //循环获取查询记录FvjECMSPLUS
{FvjECMSPLUS
echo "<li><a href='/e/action/listInfo.php?classid=".$r['classid']." '>".$r['classname']."</a></li>";FvjECMSPLUS
}FvjECMSPLUS
?>
灵动标签调用当前栏目下子栏目
FvjECMSPLUS
[e:loop={"select classname,classpath,classid from phome_enewsclass where bclassid='$GLOBALS[navclassid]' order by classid ",0,24,0}]<dd><a href="/<?=$bqr[classpath]?>/"><?=$bqr[classname]?></a></dd>[/e:loop]FvjECMSPLUS
FvjECMSPLUS
FvjECMSPLUS
<?=$class_r[$GLOBALS[navclassid]][classpath]?>FvjECMSPLUS
当前栏目地址 [!--news.url--]e/public/ClassUrl?classid=[!--self.classid--]FvjECMSPLUS
FvjECMSPLUS
灵动标签调用二级栏目
FvjECMSPLUS
<ul>FvjECMSPLUS
<li style=""><a href="index.html">首页</a></li>FvjECMSPLUS
[e:loop={"select classid,classname,islast from {$dbtbpre}enewsclass where bclassid='0' order by myorder,classid ASC limit 11",0,24,0}]FvjECMSPLUS
<?phpFvjECMSPLUS
$classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址FvjECMSPLUS
$tbname=$class_r[$bqr[classid]][tbname]; //取得表名FvjECMSPLUS
?>FvjECMSPLUS
<li><a href="<?=$classurl?>" target="_blank"><span><?=$bqr[classname]?></span></a>FvjECMSPLUS
<?phpFvjECMSPLUS
if(!$bqr[islast]){FvjECMSPLUS
?>FvjECMSPLUS
<ul>FvjECMSPLUS
<?phpFvjECMSPLUS
//取得栏目下的子栏目FvjECMSPLUS
$newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid desc limit 10");FvjECMSPLUS
while($classr=$empire->fetch($newsclass)) {FvjECMSPLUS
$classrurl=sys_ReturnBqClassname($classr,9); //取得子栏目地址FvjECMSPLUS
?>FvjECMSPLUS
<li><a href="<?=$classrurl?>"><?=$classr[classname]?></a></li>FvjECMSPLUS
<?phpFvjECMSPLUS
}FvjECMSPLUS
?>FvjECMSPLUS
</ul>FvjECMSPLUS
<?phpFvjECMSPLUS
}else{FvjECMSPLUS
?>FvjECMSPLUS
FvjECMSPLUS
<?FvjECMSPLUS
}FvjECMSPLUS
?>FvjECMSPLUS
</li>FvjECMSPLUS
[/e:loop]FvjECMSPLUS
FvjECMSPLUS
</ul>FvjECMSPLUS
FvjECMSPLUS
灵动标签列表面调用当前父栏目下的所有子栏目
FvjECMSPLUS
<?FvjECMSPLUS
$bclassid = $class_r[$GLOBALS[navclassid]][bclassid]; //获取当前父栏目IDFvjECMSPLUS
?>FvjECMSPLUS
[e:loop={"select classid,classname,classpath from [!db.pre!]enewsclass where bclassid = '$bclassid' order by classid",0,24,0}]<!-取得父栏目下的子栏目->FvjECMSPLUS
<li><a href="<?=$public_r[newsurl].$bqr[classpath]?>/"><?=$bqr[classname]?></a></li>FvjECMSPLUS
[/e:loop]FvjECMSPLUS
灵动标签三级栏目调用
[e:loop={"select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid='0' and showclass='0' order by myorder,classid desc",0,24,0}]FvjECMSPLUS
<li><a class="h3" href="/<?=$bqr[classpath]?>/"><h3><?=$bqr[classname]?></h3></a>FvjECMSPLUS
<ul>FvjECMSPLUS
<? $sql=$empire->query("select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid='$bqr[classid]' and showclass='0' order by myorder,classid asc");FvjECMSPLUS
while($r=$empire->fetch($sql)){ ?>FvjECMSPLUS
<li><a href="/<?=$r[classpath]?>/"><h3><?=$r[classname]?></h3></a>FvjECMSPLUS
<ul>FvjECMSPLUS
<? $sqlson=$empire->query("select classname,classpath from {$dbtbpre}enewsclass where bclassid='$r[classid]' and showclass='0' order by myorder,classid asc");FvjECMSPLUS
while($row=$empire->fetch($sqlson)){ ?>FvjECMSPLUS
<li><a href="/<?=$row[classpath]?>/"><h3><?=$row[classname]?></h3></a></li>FvjECMSPLUS
<? } ?>FvjECMSPLUS
</ul>FvjECMSPLUS
</li>FvjECMSPLUS
<? } ?>FvjECMSPLUS
</ul>FvjECMSPLUS
</li>FvjECMSPLUS
[/e:loop]FvjECMSPLUS
二级栏目调用并高亮
[e:loop={"select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid='$fclassid' and showclass='0' order by classid asc",0,24,0}]FvjECMSPLUS
<a href="/<?=$bqr[classpath]?>/" <? if($classid==$bqr[classid]){echo 'class="hover"';}?>><?=$bqr[classname]?></a>FvjECMSPLUS
<?FvjECMSPLUS
if($classid==$bqr[classid]){FvjECMSPLUS
echo '<ul class="sonclass">';FvjECMSPLUS
$sql =$empire->query("select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid='$bqr[classid]' and showclass='0' order by classid asc");FvjECMSPLUS
while($r=$empire->fetch($sql))FvjECMSPLUS
{FvjECMSPLUS
?>FvjECMSPLUS
<a href="/<?=$r[classpath]?>/" <?if($sonclassid==$r[classid]){?>class="curr"<?}?>><?=$r[classname]?></a>FvjECMSPLUS
<?FvjECMSPLUS
}FvjECMSPLUS
echo '</ul>';FvjECMSPLUS
}FvjECMSPLUS
?>FvjECMSPLUS
FvjECMSPLUS
[/e:loop]FvjECMSPLUS
FvjECMSPLUS
当前父栏目下的子栏目
FvjECMSPLUS
[e:loop={"select classname,classpath,classid from phome_enewsclass where bclassid='".$class_r[$GLOBALS[navclassid]][bclassid]."' and showclass=0 order by myorder,classid desc ",0,24,0}]<?php $classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址 ?>FvjECMSPLUS
<a href="<?=$classurl?>" class="list-group-item" id="cid<?=$bqr[classid]?>"><?=$bqr[classname]?></a>FvjECMSPLUS
[/e:loop]FvjECMSPLUS
<script>var changeclass=window.document.getElementById('cid[!--self.classid--]');changeclass.className='list-group-item active';</script>FvjECMSPLUS
当前栏目
[e:loop={"select classname,classpath,classid from phome_enewsclass where bclassid='$GLOBALS[navclassid]' order by classid ",0,24,0}]<dd><a href="/<?=$bqr[classpath]?>/"><?=$bqr[classname]?></a></dd>[/e:loop]
如下示例代码:
[e:loop={"select classid,classname,islast from {$dbtbpre}enewsclass where bclassid='0' order by myorder,classid ASC limit 11",0,24,0}]
<?php
$classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址
$tbname=$class_r[$bqr[classid]][tbname]; //取得表名
?>
<li><a href="<?=$classurl?>" target="_blank"><span><?=$bqr[classname]?></span></a>
<?php
if(!$bqr[islast]){
?>
<ul>
<?php
//取得栏目下的子栏目
$newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid desc limit 10");
while($classr=$empire->fetch($newsclass)) {
$classrurl=sys_ReturnBqClassname($classr,9); //取得子栏目地址
?>
<li><a href="<?=$classrurl?>"><?=$classr[classname]?></a></li>
<?php
}
?>
</ul>
<?php
}else{
?>
<?
}
?>
</li>
[/e:loop]
免责/版权声明:
本篇文章给大家谈谈灵动标签调用当前栏目,二级栏目,三级栏目和动态页面调用栏目方法汇总以及帝国CMS对应的知识,感谢你花时间阅读本站内容,希望对各位有所帮助,你也可以查看更多关于帝国CMS的信息。
1、所有来源标注为 ECMSPLUS/zwcms.com的内容版权均为本站所有,若您需要引用、转载,只需要注明来源及原文链接即可,如涉及大面积转载,请来信告知,获取授权。
2、本站所提供的文章资讯、软件资源、素材源码等内容均为作者提供、网友推荐、互联网整理而来(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考,如有侵犯您的版权,请联系我们,本站将在三个工作日内改正。
3、若您的网站或机构从本站获取的一切资源进行商业使用,除来源为本站的资料需与本站协商外,其他资源请自行联系版权所有人。
4、 ECMSPLUS/zwcms.com不保证资源的准确性、安全性和完整性,请您在阅读、下载及使用过程中自行确认,本站亦不承担上述资源对您或您的网站造成的任何形式的损失或伤害
5、未经 ECMSPLUS/zwcms.com允许,不得盗链、盗用本站资源;不得复制或仿造本网站,不得在非 ECMSPLUS/zwcms.com所属的服务器上建立镜像, ECMSPLUS/zwcms.com对其自行开发的或和他人共同开发的所有内容、技术手段和服务拥有全部知识产权,任何人不得侵害或破坏,也不得擅自使用。
6、互联网的本质是自由与分享,我们真诚的希望,每一份有价值的正能量能够在互联网中自由传播,能够为每一个网站提供动力。
标签:
-
二维码种子溯源系统,一物一码防伪验证查询(单用户版) 支持定制开发
-
帝国cms7.5精仿企业信息综合门户《莞商网》(原创)
-
厂房网,厂房出租,厂房出售,仓库出租,园区招商商铺厂房网整站源码