首页 > 教程 >
dedecms利用loop标签调用discuz论坛中的内容
2023-03-05教程围观次
简介我想在织梦dedecms首页调用特定栏目的精华帖,但是JS太慢,想生成HTML。我现在是这样调最新帖的,请问怎么调某个板块的精华帖?论坛最新主题:{dede:looptable="cdb_threads"sort="tid"row="10"}·[field:subjectfunction="cn_substr('@me',30)"/]([field:lastpostfunction="date('
我想在织梦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}
下载链接:网站源码/小程序源码/网站模板下载
下载排行
- 群多多社群人脉H5-2.1.4多开插件+小程序独立前端+搭建教程
- 慧眼识花草微信小程序源码/植物辨别微信小程序源码
- 微信小程序格创校园跑腿小程序源码v1.1.64+前端
- 2022年新版电影小程序商业版+前端无后门+搭建教程亲测
- 最新仿720云全景制作源码|krpano仿720云全景网站源码
- 抖音艺术签名小程序源码/艺术签名设计小程序源码/字节跳动小程序开发
- 苹果CMS V10专享版MXoneV10.6魔改版影视网站模板/二开大气短视频网站模板
- 图片编辑小程序源码/拼图小程序源码
- 美女图片站 CX-UDY3.1最新破解版全解密去授权版无限制
- 微预约支付版v8.5.85 预约、报名、订单等场景的微信模块