输出随机文章

[e:loop={'select titleurl,title from [!db.pre!]ecms_news where classid='.$navinfor['classid'].' and id<>'.$navinfor['id'].' order by rand() limit 10',6,24,0}]
<div class="recent-post-tab">
<a href="[!--news.url--]<?=ltrim($bqr[titleurl],'/')?>"><?=$bqr[title]?></a>
</div>
[/e:loop]

上述代码实现功能:随机输出不包含自身的随机10篇文章的链接标题

Related Posts: 帝国cms-灵动标签-输出随机文章 :