dede:channelartlist标签当前栏目高亮实现教程
打开 /include/taglib/channelartlist.lib.php 找到
$pv->Fields['typeurl'] =S V b & . A p G_ 1 ) % S GetOneTypeUrlA($typeids[$i]);
在它下面加入
if($typeids[$i]['id'] == $refObj->TypeLink-&g| A D Ft;TypeInfos['id'] || $t) P E 3 r L r F Yypeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->C D f q D;TypeLink->TypeInfos['id']) ) { $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current'; } else { $pv-&t w h X v (gt;Fields['currentstyle'] =C 0 h Z j o 9 Z ''; }
然后 dede:ch[ t u H ` ~ H !annelartlistX [ L z ) 标签里是高亮标签调用是
{dede:fieg F b lld.currentstyle/}
例如下面的写A _ @ / $法
嵌套dede标签
<p class="nav"> <ul> {dede:channelartlist row=7 typeid=top currentstyle=currentD a ] _ ) a 2 J f} <liR V i clak = 8 I 3 3b m q 1 } n 8 Sss="{dy X $ \ ` : ] IedeC [ X:field.currentstylg 9 o l v 7e/}"> <a href="httpe # ^ P / * L p://www.dede58.C ,W : 3 V | d } % hcom/a/dedejq/{dede:field.typeurl/}">{dede:fieldN ~ \ P W } \ #.typename/}&lO ) a e a s st;/a> <ul> {2 9 S T - 8 U \ adede:channel type='son' nosel8 7 \ % B P Yf='yes' row='10'$ t M ) . \ P F currentstyld 7 _ [ B ? G # xe="<{ t % A} A l ~ A [ h = p;li class='hover'><a hQ _ C n Oref='http://www.dede58.com/a/dedejq/~typelin: } u P 5 ) C p [k~'>~typename~</a></C E ] h Y Dli>"} <li><a href="http://www.dede58.comZ \ ) e ) E \/a/dedejq/[field:typeurl/]">[field:typename/]</a></li> {/dede:channel/ 7 , b} </ul> &lu f x ; / L =t;b z 3 I ?/li> {/dede:chai H 4 _ ~ 0 wnnelartlis$ q w st}J k d </ul> </p>
织梦教程
打开 /include/tagl_ J , / j ` J c zib/channel.lib.L q H C r php 找到
global $dsql;
改成
gl? + cobal $dsql,$_sys_globals;
继续找到
$row['id']==$typeid
改C J K ] Q 0 S N成
$row['id']==$typeO m e Kid || $row['id']=q N Q k , ==$_sys_globals['typeid']