[e:loop={"select * from [!db.pre!]enewsuserlist where classid=2",1,24,0}] <? $url=str_replace('../','',$bqr['filepath']); ?> <div class="page-x page-x-1 border"> <h2><a href="[!--news.url--]<?=$url?>"><?=$bqr['listname']?></a></h2> <ul> <?php $sql=$empire->query("select * from {$dbtbpre}ecms_news where jieri='".$bqr['listname']."' order by newstime limit 12"); while($r=$empire->fetch($sql)){ echo '<li><a href="'.$r[titleurl].'" target="_blank">'.$r[title].'</a></li>'; } ?> </ul> </div> [/e:loop]
首先调用自定义列表分类ID等于2的所有自定义列表的标题及链接。在用PHP循环调用当前自定义列表下的信息。
标签: