织梦dedecms商业教程 网站建设中用织梦做网站如何使arc支持也支持current
目前,网站建设行业中,用织梦做网站的人也越来越多。当中可能会遇到很多问题。今天说一下
当网站建设类似于关于我们多篇文章时,需要高亮功能的话如何实现。
$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
);
其实就是在调用函数的最后加了一个$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, $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='')
其实就是在函数后面加了一个$currentstyle=''形参
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);
}
保存,即可。
调用方法:
{dede:arclist titlelen='42' row='10' currentstyle="
~typename~
"}
[field:array runphp='yes']
if(@me['currentstyle']){
@me = @me['currentstyle'];
}else{
@me = "
{@me['title']}
";
}
[/field:array]
{/dede:arclist}
相关文章
- 传奇教程 GOM引擎RMB地图脚本,传奇私服一条龙设置RMB点进入地图的方法 传奇脚本
- 传奇教程 GOM引擎转生地图脚本,传奇开区时添加需要转生进入地图的命令 传奇脚本
- 传奇教程 GOM引擎九零土豪脚本,传奇一条龙开区时添加VIP称号地图命令 传奇脚本
- 传奇教程 GOM引擎首冲地图脚本,传奇私服一条龙添加首充地图的教程 传奇脚本
- 传奇教程 GOM引擎贪婪老人地图脚本,传奇服务端添加三相幻想脚本教程 传奇脚本
- 传奇教程 GEE提升人物属性脚本,传奇一条龙开区时设置狂暴属性状态 传奇脚本
- 传奇教程 GEE引擎附魔系统脚本,传奇私服版本添加首饰附魔的教程和范例 传奇脚本
- 传奇教程 GOM引擎超级回馈大礼脚本,传奇版本中添加回馈大礼的脚本示例 传奇脚本
- 传奇教程 GOM引擎传奇土城泡点脚本,传奇一条龙开区时添加土城自动安全泡点教程 传奇脚本
- 传奇教程 GEE引擎传奇提取充值点,传奇服务端中脚本提取充值点的命令和范例 传奇脚本