{dede:sql sql="select as_ask.id,as_ask.title,as_askanswer.content from as_ask LEFT JOIN as_askanswer on as_ask.id=as_askanswer.askid where as_askanswer.ifanswer=1 and as_askanswer.ifcheck=1 or as_ask.bestanswer=as_askanswer.id order by as_ask.id desc LIMIT 0,1"}<br /><strong>问:</srtong><a href="/ask/question.php?id=[field:id/]" class="link3">[field:title function=cn_substr(@me,46)/]</a><br /><p><strong>答:</srtong>[field:content function=cn_substr(html2text(@me),40)/],...<a href="/ask/question.php?id=[field:id/]" class="link2">详情>></a></p><br />{/dede:sql}
放在首页任意位置调用就可以了。
里面调用条数,长度,可以根据自己的需求进行调整 。
可在在全局标记测试效果。
如果需要分栏目调用,那么加入as_ask.tid2=XX,如我的整形栏目为as_ask.tid2=7,调用如下:
{dede:sql sql="select as_ask.id,as_ask.title,as_askanswer.content from as_ask LEFT JOIN as_askanswer on as_ask.id=as_askanswer.askid and as_ask.tid2=7 where as_askanswer.ifanswer=1 and as_askanswer.ifcheck=1 or as_ask.bestanswer=as_askanswer.id order by as_ask.id desc LIMIT 0,1"}<br /><strong>问:</srtong><a href="/ask/question.php?id=[field:id/]" class="link3">[field:title function=cn_substr(@me,46)/]</a><br /><p><strong>答:</srtong>[field:content function=cn_substr(html2text(@me),40)/],...<a href="/ask/question.php?id=[field:id/]" class="link2">详情>></a></p><br />{/dede:sql}
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 织梦模板下载dede源码的首页调用问答模块内容的教程
- 09-18 (自适应手机端)响应式新闻资讯pbootcms网站模板 博客自媒体技术门户网站源码下载
- 09-18 (自适应手机端)HTML5响应式甲醛检测网站模板 安全检测公司pb网站源码下载
- 09-15 (带手机版)电气设备pbootcms网站模板 机械设备重工业网站源码下载
- 09-08 (自适应手机端)响应式家政服务网站模板 - 简繁双语pbootcms保洁家教服务企业类网站源码
- 09-04 (自适应手机端)SEO优化排名服务公司网站模板 建站公司网络服务公司网站源码
- 09-03 (带手机版)康复培训学校网站模板 教育培训机构pbootcms源码下载
- 09-01 响应式互联网网站设计建设网站模板 IT软件互联网类企业易优CMS源码
- 08-30 (自适应手机端)响应式论文期刊书籍类网站模板 期刊发表论文写作网站pb源码下载
- 08-29 (自适应手机)响应式旅居日记资讯网站模板 博客文章资讯易优CMS源码下载
- 08-29 (自适应手机端)中药馆中医网站模板 美容保健医院医疗pbootcms源码下载
- 08-20 (自适应手机端)响应式蓝色外贸英文网站模板 机械电子设备公司pbootcms英文源码下载
- 08-16 响应式宠物装备用品网站模板下载 农业畜牧养殖宠物易优CMS源码
- 08-15 响应式创业资讯新闻网站模板 图文博客美文资讯易优CMS网站源码下载
- 08-14 pbootcms模板做百度推广竞价后打不开
- 08-12 (自适应手机端)行业协会机构网站模板 社团网站pbootcms源码下载
- 08-11 (自适应手机端)响应式通用导航网址网站模板 网站导航源码易优CMS下载
- 08-11 (自适应手机)响应式图片展示网站模板 美女图片展示类网站源码下载
- 08-09 (自适应手机端)APP软件应用介绍网站模版 落地页单页网站宣传页面专题pbootcms模板下载
- 08-06 (自适应手机端)响应式电子数码产品网站展示模版 家用电器销售租赁pbootcms网站模板下载
- 08-05 html5响应式慈善机构模板 自适应社会团体网站模版静态html英文模版下载