织梦arclist标签当前文章高亮方法

宁愿跑起来被拌倒无数次,也不愿规规矩矩走一辈子,就算跌倒也要豪迈的笑。不管梦想是什么,只有带着淡然的态度,做好当前的事情。

织梦arclist标签支持文章高亮currentstyle属性方法:

include/taglib/arclist.lib.php

第一步:查找:

$channelid = $ctag->GetAtt('channelid');

替换:

$channelid = $ctag->GetAtt('channelid');

$currentstyle = $ctag->GetAtt('currentstyle');

第二步:查找:

$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),

$tagid,$pagesize,$isweight

替换:

$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),

$tagid,$pagesize,$isweight,$currentstyle

第三步:查找:

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='')

第四步:查找:

$row['textlink'] = "<a rel="nofollow noopener noreferrer" href='".$row['filename']."'>".$row['title']."</a>";

替换:

$row['textlink'] = "<a rel="nofollow noopener noreferrer" href='".$row['filename']."'>".$row['title']."</a>";

if($currentstyle=='on')

{

if($row['id']==$arcid) $row['style']="on";

else $row['style']="";

}

调用方法:

{dede:arclist titlelen='60' currentstyle='on' row='8' typeid='3'}

<li><a class="[field:style/]" rel="nofollow noopener noreferrer" href="[field:arcurl/]" title="[field:title/]">[field:title/]</a></li>

{/dede:arclist}

本文织梦arclist标签当前文章高亮方法到此结束。曾经拥有的不要忘记,已经得到的要珍惜,属于自已的不要放弃。小编再次感谢大家对我们的支持!

标签: 织梦 arclist