This article mainly introduces the dream Dedecms Home navigation bar currentstyle parameter Invalid alternative method, Currentstyle invalid parameter will cause navigation bar can not be highlighted, this article gives another solution, the need for friends can refer to the next
The default Weaving Dream home page does not set the highlight properties, as long as other columns can. The following code solves this problem:
The code is as follows:
</p><p><li{dede:field Name=typeid runphp= "Yes"} (@me = = "")? @me = "class= ' hover '": @me = ""; {/dede:field}><a href= ' {dede:global.cfg_cmsurl/}/' ><span> home </span></a></li>{ Dede:channel type= ' top ' row= ' currentstyle= ' <li class= ' hover ' ><a href= ' ~typelink~ ' ~rel~><span> ~typename~</span></a></li> "}<li><a href= ' [field:typeurl/] ' [Field:rel/]><span >[field:typename/]</span></a></li>{/dede:channel}</p><p>
Dedecms template Download Address: www.php.cn/xiazai/code/dedecms
The above blue bold code is to determine whether the current column is the home page, if the home is added class= ' hover ', otherwise do not add, in order to achieve the desired effect.