国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

織夢dede怎么調用指定的文章

2024-07-12 09:10:08
字體:
來源:轉載
供稿:網友

在織夢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}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 苏尼特右旗| 泗阳县| 安宁市| 察隅县| 玉屏| 古丈县| 宁武县| 永靖县| 应城市| 乾安县| 瑞丽市| 泗洪县| 临湘市| 德庆县| 靖西县| 阿图什市| 且末县| 博罗县| 乐至县| 江山市| 潍坊市| 甘孜| 永修县| 双城市| 德州市| 吴桥县| 宜春市| 辽宁省| 杭州市| 梓潼县| 定州市| 南雄市| 泰兴市| 嵩明县| 揭阳市| 淮滨县| 鄂伦春自治旗| 治县。| 靖边县| 万宁市| 扎赉特旗|