我想在首頁調用特定欄目的精華帖,但是JS太慢,想生成HTML。
我現在是這樣調最新帖的,請問怎么調某個板塊的精華帖?
論壇最新主題:<br/>
{dede:loop table="cdb_threads" sort="tid" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}
剛剛試了下,這樣可以調特定板塊的主題,現在就想問,怎么調精華主題?
論壇最新主題:<br/>
{dede:loop table="cdb_threads" if="fid=5 and displayorder!=-1" sort="tid" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}
再次發現,這樣可以顯示精華帖。
論壇最新主題:<br/>
{dede:loop table="cdb_threads" if="fid=5 AND digest>0 and displayorder!=-1 " sort="tid" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}
這樣又可以按查看次數排序:
論壇最新主題:<br/>
{dede:loop table="cdb_threads" if="fid=5 and displayorder!=-1" sort="views" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}
新聞熱點
疑難解答