石家莊網(wǎng)站建設(shè)中用織夢(mèng)做網(wǎng)站如何使arc支持也支持current
發(fā)布時(shí)間:2013-10-22 點(diǎn)擊次數(shù):
目前,網(wǎng)站建設(shè)行業(yè)中,用織夢(mèng)做網(wǎng)站的人也越來(lái)越多。當(dāng)中可能會(huì)遇到很多問(wèn)題。今天說(shuō)一下
當(dāng)網(wǎng)站建設(shè)類(lèi)似于關(guān)于我們多篇文章時(shí),需要高亮功能的話如何實(shí)現(xiàn)。
$channelid = $ctag->GetAtt('channelid');
在下面插入:
$currentstyle = $ctag->GetAtt('currentstyle');
2、查找:
return lib_arclistDone
(
$refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
$ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
$ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
$tagid,$pagesize,$isweight
);
替換為:
return lib_arclistDone
(
$refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
$ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
$ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
$tagid,$pagesize,$isweight,$currentstyle
);
其實(shí)就是在調(diào)用函數(shù)的最后加了一個(gè)$currentstyle實(shí)參
3、查找
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
$imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
$innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N')
替換為:
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
$imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
$innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='',$order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0,$isweight='N',$currentstyle='')
其實(shí)就是在函數(shù)后面加了一個(gè)$currentstyle=''形參
4、查找
$row['textlink'] = "<a href='".$row['filename']."'>".$row['title']."</a>";
在下面插入:
if($currentstyle && $row['id']==$arcid){
$currentstyle = str_replace('~typelink~', $row['filename'], $currentstyle);
$row['currentstyle'] = str_replace('~typename~', $row['title'], $currentstyle);
}
保存,即可。
調(diào)用方法:
{dede:arclist titlelen='42' row='10' currentstyle="<li class='current' ><a href='~typelink~'>~typename~</a></li>"}
[field:array runphp='yes']
if(@me['currentstyle']){
@me = @me['currentstyle'];
}else{
@me = "<li class='current' ><a href='{@me['arcurl']}'>{@me['title']}</a></li>";
}
[/field:array]
{/dede:arclist}
------------------------------------------------------------------------------------------
藍(lán)點(diǎn)網(wǎng)絡(luò)提供:網(wǎng)站建設(shè)、APP開(kāi)發(fā)、微信小程序、400電話、軟件開(kāi)發(fā)、服務(wù)器托管/租用等業(yè)務(wù)。
從2003年開(kāi)始,我們始終堅(jiān)守【網(wǎng)站建設(shè)】服務(wù),19年從未放棄!!
售前咨詢(xún):0311-8736 0077
售后服務(wù):0311-8736 0066
值班手機(jī):189 3198 6878