织梦dede怎么调用指定的文章
在织梦dede网站首页调用站内新闻是必不可少的,但是有的时候不能根据自己的需要来调用指定的文章,想要调用自己指定的文章还要做一些修改。
在网站中调用指定文章可以使用织梦默认的标签idlist,在调用的时候使用以下代码:
{dede:arclist idlist='13' limit='0,1' infolen='60'}
<span><a href="[field:arcurl/]" target="_blank">[field:title/]</a></span>
<span>[field:infos/]<a href="[field:arcurl/]" target="_blank">[详细]</a></span>
{/dede:arclist}
如果这样调用不出来文章的话就可以试试下面的方法:
打开include\inc_arcpart_view.php文件
找到第function ParseTemplet();这一个函数里面的
〔
$this->dtp->Assign($tagid,
$this->GetArcList($typeid,$ctag->GetAtt("row"),$ctag->GetAtt("col"),
$titlelen,$infolen,$ctag->GetAtt("imgwidth"),$ctag->GetAtt("imgheight"),
$ctag->GetAtt("type"),$orderby,$ctag->GetAtt("keyword"),$innertext,
$ctag->GetAtt("tablewidth"),0,"",$channelid,$ctag->GetAtt("limit"),$ctag->GetAtt("att"),
$ctag->GetAtt("orderway"),$ctag->GetAtt("subday"),$autopartid,$ctag->GetAtt("ismember")
)
〕
将里面的0改为$ctag->GetAtt(‘arcid’),就行了
打开incclude\inc\inc_fun_spgetarclist.php文件
找到
〔if($arcid!=0) $orwhere .= " And arc.ID<>'$arcid' ";〕
替换成:
if($arcid!=0) $orwhere .= " And arc.ID='$arcid' ";
if($arcid==0) $orwhere .= " And arc.ID<>'$arcid' ";
在使用调用代码的时候使用如下代码:
{dede:arclist arcid='13' row='5' col='1' titlelen='24' }
<table>
<tr>
<td>[field:title/]
[field:info/]</td>
</tr>
</table>
{/dede:arclist}
免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品织梦源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站织梦程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ进行交流。
- dedecms SQL注入漏洞 member/album_add.php 修复
- dedecms cookies泄漏导致SQL漏洞 /member/article_add
- Windows虚拟主机指定目录禁用脚本执行权限方法
- 西部数码虚拟主机设置禁止脚本执行权限
- 阿里云主机设置织梦程序禁止脚本执行权限及禁止写入
- dedecms织梦导致CPU峰值现象的解决办法
- 织梦程序网站被挂马或快照劫持终极解决办法
- 阿里云提醒/member/reg_new.php注入漏洞解决办法
- 织梦安全:更改plus名称
- 织梦栏目属性增加链接rel、nofollow和新窗口target
- 织梦问答模块PHP7报错解决方法
- dedecms解决移动端首页不自动更新问题