aaa
帝国CMS自定义页面调用分类的方法:
具体方法如下:
举例一、调用自定义页面分类ID=1的页面导航
[e:loop={'select id,path,title from [!db.pre!]enewspage where classid=1 order by id',20,24,0}] <?php $pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']); ?> <li><a href="<?=$pageurl?>"><?=$bqr[title]?></a></li> [/e:loop]
举例二、调用自定义页面导航并识别当前自定义页面
[e:loop={'select id,path,title from [!db.pre!]enewspage where classid=1 order by id',20,24,0}] <?php $pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']); $css='pagecss'; if($classid=='page'.$bqr[id]) { $css='selfpagecss'; } ?> <li class="<?=$css?>"><a href="<?=$pageurl?>"><?=$bqr[title]?></a></li> [/e:loop]