dedecms利用loop标签调用discuz论坛中的内容
类别:建站知识   时间:05-09

我想在织梦dedecms首页调用特定栏目的精华帖,但是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}

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890