<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦channelartlist实现高亮显示

时间:2020-12-15

要求实现:dede:channelartlist 高亮显示
{dede:channelartlist typeid='7'}
<a href="{dede:field name='typeurl'/}" >{dede:field name='typename'/}</a>
{/dede:channelartlist}

解决方案:
1:修改/include/taglib/channelartlist.lib.php文件。
找到:$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);

在此行代码下方增加以下代码:

if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id']){ 
            $pv->Fields['currentstyle'] = 'class="xzon"'; 
              } 
         else{ 
         $pv->Fields['currentstyle'] = ''; }
注意:class="xzon" 这个是你的CSS里要设置的高亮显示样式。

2:标签代码为:
{dede:channelartlist typeid='7'}
<a href="{dede:field name='typeurl'/}"  {dede:field name='currentstyle'/}>{dede:field name='typename'/}</a>
{/dede:channelartlist}

看下代码有何不同?多多分享下教程,帮助更多的织梦爱好者。
0
首页
案例
关于
联系