
| 歡迎訪問全國企業網站設計NO.1網站開發商平臺 | 付款方式 |
POST TIME:2020-10-09
做織夢dedecms網站導航欄時,我們一般需要設置當前欄目高亮顯示,這個使用currentstyle就能直接實現,但是如果在首頁時怎么讓首頁模塊高亮呢?
織夢當前欄目高亮:
<style>.hover{background:#F00;}</style>
{dede:channel currentstyle="<li class='hover'><a href='~typelink~'>~typename~</a></li>"}
<li><a href='[field:typeurl/]'>[field:typename/]</a></li>
{/dede:channel}
|
織夢首頁高亮方法:
<style>.hover{background:#F00;}</style>
<a {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='hover'":@me="";
|