? 做网站比如一些帮助、说明类的页面可以用栏目去做,也可以用文章来做,考虑用文章是因为文章写起来比较方便,还可以用自定义的字段,比栏目要灵活得多。栏目比较好处理当前栏目高亮的问题,写法如下
{dede:channel typeid='' row='' currentstyle="
注意typelink和typeurl的写法。如果用文章来做的话,就需要修改几个地方,网上有些错误的写法,笔者亲自测试过,修正后分享给大家。
?
include/taglib/arclist.lib.php
? ? ? ? 找到
//增加对分页内容的处理
? ? ? ? 在这段前加入
$currentstyle = $ctag->GetAtt('currentstyle');
? ? ? ?
?在大概135行,找到
$tagid,$pagesize,$isweight
? ? ? ? 增加,$currentstyle? 也就是
$tagid,$isweight,$currentstyle
? ? ? ??
大概在170行,找到
$isweight='N'
? ? ? ? 后面增加
,$currentstyle=''
? ? ? ??
在519行,找到
$row['textlink'] = "
? ? ? ? 后面增加
//by织梦模板 www.dede58.com
if($currentstyle && $row['id']==$arcid){
$currentstyle = str_replace('~typelink~',$row['filename'],$currentstyle);
$row['currentstyle'] = str_replace('~typename~',$row['title'],$currentstyle);
}
?
?
模板调用,具体样式请自行修改
{dede:arclist currentstyle=" |