帝国CMS实现二级导航菜单

最近开始接触帝国CMS.碰到二级菜单的问题.学习,记录..

 

  1. <div class="navigation">
  2. <ul>
  3. <li><a href="[!--news.url--]" target="_self">首页</a></li>
  4. <?php
  5. $ecms_bq_sql=sys_ReturnEcmsLoopBq('select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder limit 8',20,24,0); $bqno=0;
  6. while($bqr=$empire->fetch($ecms_bq_sql))
  7. {
  8. $bqsr=sys_ReturnEcmsLoopStext($bqr);
  9. $bqno++;
  10. ?>
  11. <li><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_self" ><?=$bqr[classname]?></a>
  12. <ul>
  13. <?php
  14. $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select classid,classname,classpath from [!db.pre!]enewsclass where bclassid='$bqr[classid]' order by myorder limit 5",20,24,0);
  15. $bqno2=0;
  16. while($bqr2=$empire->fetch($ecms_bq_sql2))
  17. {
  18. $bqsr2=sys_ReturnEcmsLoopStext($bqr2);
  19. $bqno2++;
  20. ?>
  21. <li><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?><?=$bqr2[classpath]?>" title="<?=$bqr2[classname]?>" target="_self" ><?=$bqr2[classname]?></a></li> <?php
  22. }
  23. ?>
  24. </ul>
  25. </li>
  26. <?php
  27. }
  28. ?>
  29. </ul>
  30. </div>

发表评论