国产探花免费观看_亚洲丰满少妇自慰呻吟_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}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 旺苍县| 迁安市| 霸州市| 江西省| 溆浦县| 东光县| 西和县| 巴中市| 沁源县| 德安县| 海城市| 闻喜县| 广灵县| 沙田区| 井研县| 皋兰县| 剑川县| 宁化县| 宜黄县| 怀仁县| 北海市| 葫芦岛市| 康保县| 柯坪县| 屯留县| 满洲里市| 汉寿县| 保山市| 昌黎县| 原阳县| 正阳县| 曲阜市| 江津市| 黎平县| 银川市| 宝清县| 洛扎县| 无极县| 阳城县| 张北县| 噶尔县|