dedecms當前欄目高亮以及首頁顯示高亮

織夢默認導航標籤沒有給首頁標籤判斷加高亮的設置,小編我從百度查找解決方法以下:php

<li  ><a {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='curr'":@me="";{/dede:field}  href="{dede:global.cfg_basehost/}" alt="首頁" ">首頁</a></li >class

「{dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='hover'":@me="";{/dede:field}」就是判斷當前欄目是不是首頁,若是是首頁就加上class='curr'樣式百度

當前欄目顯示高亮設置channel

{dede:channel       row='6'             type ='top'   currentstyle="<a  class='curr' href='~typelink~' ~rel~>~typename~</a>"  }
          
                <li><a  href="[field:typelink/]" alt="[field:typename/]">[field:typename/]</a></li>

              
         方法

相關文章
相關標籤/搜索