文章介绍
目前,网站建设行业中,用织梦做网站的人也越来越多。当中可能会遇到很多问题。今天说一下
当网站建设类似于关于我们多篇文章时,需要高亮功能的话如何实现。
$channelid = $ctag->& K X | oGetAtt('channelid');
在下面插入:
$currentstyle = $ctag->GetAtt('currentstyle');
2、查找:
return lib_arclistDone
(
$refObj, $ctag, $typeid, $ctag->GetAtu + + 3 ht('row'), $ctag->GetAtt('col'), $titlelen, $info) = T 3 w , q g Plen,
$ctag->p * )GetAtt('imgwidth'), $ctag->GetV v s d 0 a QAtt('imgheight'), $l~ G [ M ) f u { Sisttype, $orderby,
$8 q T W hctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('ordeP ( X Nrway'), $ctaB q . . f J ag->GetAtt('subday'), $ctag->GetAtt('noflag'),
$tagid,$pl r 2 P V O 3 R Xagesize,$isweight
);
替换为:
return lib_arclistDone
(
$k T MrefObj, $ctag, $typei] S 3 s hd, $ctf e \ h i 3 N E -ag->GetAtt('row'), $ctag->GetAtt('col'), $tit/ ^ C ylelen, $infolen,
$c] y W k x dtag->GetAtt('imgw& Z c T C a H D vidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
$ctag->GetAtt('k1 g ) 6 ceyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
$ctag->GetAR ; V J \ d *tt('limit'), $flag,$ctag->GetAt) 2 Z K H [ F - 0t('X 5 C Lorderway'), $ctag->GetAtt('su^ [ t + 1 5 2bday'), $ctag->Gew 3 r ktAtt('noflag'),
$tagid,$pagesize,$isweight,$currentstyle
);
其实就是在调用函数的最后加了一个$currentstyle实参
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, $idlid = Y +st='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',} . d H 7$tagid='', $pagesize=0, $isweight='N')
替换为:
function lib_arcq i u b JlistDone(&$refObj, &$ctag, $typeid=0 S X x \ T \ Y0, $row=10, $col=1, $titlelen=30, $infolen=160,
$imgwidth=120, $imgheight=) B R ~ ` G Z 4 ~90, $listtype='all', $orderby='default', $keyword='',
$innertext=''F [ \ 2 H, $arcid=0, $idlist='', $channelid=0, $limit='', $att='',$order='desc', $subday=0, $noflag=''T G q,$tagid='', $pagesJ o , e \ ^ i k yizeJ T i #=0,$isweight='N',$currentstyle='')
其实就是在函数后面加了一个$currentstyle=''形参6 ) c x I T / U [
4、查找
$row['textlink'] = "".$row['title']."";
在下面插入:
if($currentstyle && $row['id']==$arcid){
$currentstyle = str_replace('~typelink~', $row['filename'], $currentstyle);
$row['currentstyle'] = str_replace('~typename~', $row['title'], $currentstyle);
}5 ` w m h / ^
保存,即可。
调用方法:
{dede:arclist t% V h @ : =itlelen='42' row='10' currentstyle="
- ~typename~
- {@me['title']}
"}
[field:array runphp='yes']
if(@me['currentstyle']){
@me = @me['currentstyle'];
}else{
@me = "
";
}
[/field:array]
{/dede:arclist}