查找- <!--{eval $mnid = getcurrentnav();}-->
复制代码
改成- <!--{eval $mnid = getcurrentnav();}-->
- <!--{if $mnid=='mn_portal'&&$cats[0]}-->
- <!--{loop $_G['setting']['navs'] $k $v}-->
- <!--{if $v['navname'] == $cats[0]}-->
- {eval $mnid = $v['navid'];}
- {eval break;}
- <!--{/if}-->
- <!--{/loop}-->
- <!--{/if}-->
复制代码 查找- <div id="mu" class="cl">
- <!--{if $_G['setting']['subnavs']}-->
- <!--{loop $_G[setting][subnavs] $navid $subnav}-->
- <!--{if $_G['setting']['navsubhover'] || $mnid == $navid}-->
- <ul class="cl {if $mnid == $navid}current{/if}" id="snav_$navid" style="display:{if $mnid != $navid}none{/if}">
- $subnav
- </ul>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{/if}-->
- </div>
复制代码 下面加入- <!--{if CURSCRIPT=='portal'&&$cats}-->
- <script type="text/javascript">
- (function (){
- var cat_name = "{$cats[1]}",
- CSS = 'style="color:red;"',html="",pos=0,pos2=0,str1="",str2="";
- if(!cat_name)cat_name = "{$cat['catname']}";
- if(cat_name&&$('snav_{$mnid}')){
- html = $('snav_{$mnid}').innerHTML;
- $('snav_{$mnid}').innerHTML = html.replace('>'+cat_name,css+' >'+cat_name);
- }
- })();
- </script>
- <!--{/if}-->
复制代码 增加三级导航输出
可以加在
</div>
<!--{ad/subnavbanner/a_mu}-->
上面去- <!--{if CURSCRIPT=='portal'&&$cats}-->
- <!--{if $cat['subs']}-->
- {eval $_cat_data =&$cat['subs'];}
- <!--{elseif $cat[others]&&!$cat[shownav]}-->
- {eval $_cat_data =&$cat['others'];}
- <!--{/if}-->
- <!--{if $_cat_data}-->
- <ul class="cl current">
- <!--{loop $_cat_data $k $v}-->
- <li><a href="{$v['caturl']}"{if $_G['catid']==$v['catid'] || $article['catid']==$v['catid']} style="color:red;"{/if}>{$v['catname']}</a></li>
- <!--{/loop}-->
- </ul>
- <!--{/if}-->
- <!--{/if}-->
复制代码 修改高亮颜色 上一步代码里面的"如果自身有CSS
可以把 style="color:red;" 改成 class="你的CSS类名" |