帝国cms⾸页导航条如何调⽤⼀级、⼆级栏⽬?
1 <div class="collapse navbar-collapse" id="example-navbar-collapse">
2 <ul id="menu-%e5%af%bc%e8%88%aa%e8%8f%9c%e5%8d%95" class="nav navbar-nav">
帝国cms文库模板3 <li class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-11 active"><a title="⽹站⾸页" href="/">⽹站⾸页</a></li>
4 [e:loop={"select classid,classname,classpath,classimg from [!db.pre!]enewsclass where bclassid='0' and showclass=0 order by myorder asc,classid asc",0,24,0}]
5
6 <?
7$cr=$empire->fetch1("select classid from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' limit 1");
8if ($cr[classid]){
9 ?>
10 <!--判断是否有⼦栏⽬,如果有出现⼦栏⽬样式,如果没有出现⼀级栏⽬的样式-->
11 <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children dropdown">
12 <a title="<?=$bqr[classname]?>" href="<?=$public_r[newsurl].$bqr[classpath]?>/" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true"><?=$bqr[classname]?>
13 <span class="caret"></span></a>
14
15 <ul role="menu" class=" dropdown-menu">
16 <?php
17$newbook=$empire->query("select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' and showclass=0 order by myorder asc,classid asc");
18while($r=$empire->fetch($newbook)) {
19 ?>
20 <li class="menu-item menu-item-type-post_type menu-item-object-page"><a title="<?=$r[classname]?>" href="<?
=$public_r[newsurl].$r[classpath]?>/"><?=$r[classname]?></a></li>
21 <?php
22 }
23 ?>
24 </ul>
25 </li>
26
27 <?}else{?>
28 <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children dropdown"><a title="<?=$bqr[classname]?>" href=" <?=$public_r[newsurl].$bqr[classpath]?>/" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true"><?=$bqr[classname]?></a>
29 </li>
30 <?}?>
31 [/e:loop]
32 </ul>
33 </div>
View Code
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论