帝国cms调用当前栏目的父栏目下的子栏目的子栏目/三级目录,不废话,下面就是干货,上代码,代码如下:
- <div class="comm_rigbox">
- <div class="com_titRort">
- <h3>[!--bclass.name--]</h3>
- </div>
- <ul class="sort_ullist">
- <?php
- $fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);
- $class=$fcr[1]?$fcr[1]:$GLOBALS[navclassid]; //取得父栏目id
- $classurl=sys_ReturnBqClassname($r,9);
- ?>
- <!-- 调用全部子栏目 -->
- <?
- $sql=$empire->query("select classid,classname,infos from {$dbtbpre}enewsclass where bclassid='$class' and showclass=0 order by myorder,classid asc");
- $bqno=0;
- while($bqr=$empire->fetch($sql)){
- $bqsr=sys_ReturnEcmsLoopStext($bqr);
- $bqno++;
- ?>
- <!-- 子栏目名 -->
- <li>
- <div class="sort_item"><?=$bqr[classname]?><i></i></div>
- <dl>
- <!-- 子栏目下的栏目 -->
- <?
- $sqlc=$empire->query("select classid,classname,infos from {$dbtbpre}enewsclass where bclassid='$bqr[classid]' and showclass=0 order by myorder,classid asc");
- $bqno=0;
- while($bqrc=$empire->fetch($sqlc)){
- $bqsr=sys_ReturnEcmsLoopStext($bqrc);
- $bqno++;
- ?>
- <dd>
- <a href="<?=sys_ReturnBqClassUrl($class_r[$bqrc[classid]]);?>"><?=$bqrc[classname]?></a>
- </dd>
- <?
- }
- ?>
- </dl>
- </li>
- <?
- }
- ?>
- </ul>
- </div>