婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > dede織夢讓channelartlist標簽支持currentstyle屬性

dede織夢讓channelartlist標簽支持currentstyle屬性

POST TIME:2020-04-10 18:43

1.查找到:
$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'] = "<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);
}
保存,即可。
調用方法:
{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}
也可以與channelartlist標簽相結合使用,
這樣調用:
{dede:channelartlist typeid='2' currentstyle='current'}
<dt ><a class='{dede:field.currentstyle/}' href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a></dt>
{dede:arclist titlelen='42' row='10' currentstyle="<dd><a class='current' href='~typelink~'>~typename~</a></dd>"}
[field:array runphp='yes']
if(@me['currentstyle']){
@me = @me['currentstyle'];
}else{
@me = "<dd ><a href='{@me['arcurl']}'>{@me['title']}</a></dd>";
}
[/field:array]
{/dede:arclist}
{/dede:channelartlist}


收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 承德市| 新民市| 喀什市| 新野县| 龙山县| 彩票| 庆元县| 梁平县| 林芝县| 桦南县| 四子王旗| 永善县| 光泽县| 张家港市| 德令哈市| 盐津县| 湘西| 沧源| 马边| 宜兰县| 灵武市| 留坝县| 临沂市| 肥东县| 出国| 遂昌县| 墨玉县| 吉安县| 泾源县| 汪清县| 当阳市| 宽城| 连云港市| 鄯善县| 永寿县| 山阳县| 津市市| 义乌市| 宁德市| 台北市| 聂荣县|