Home  >  Article  >  Backend Development  >  Detailed introduction to the alternative method of invalid currentstyle parameter in the homepage navigation bar of Dedecms.

Detailed introduction to the alternative method of invalid currentstyle parameter in the homepage navigation bar of Dedecms.

黄舟
黄舟Original
2017-04-01 10:02:021476browse

This article mainly introduces the alternative method for the invalid currentstyle parameter of the dreamweaver dedecms homepage Navigation. Invalid currentstyle parameter will cause the navigation bar to not be highlighted. This article gives another solution. Friends who need it can refer to

By default, the homepage of Dreamweaver does not set the highlight attribute , as long as other columns can. The following code can solve this problem:

The code is as follows:

</p>
<p><li{dede:field name=typeid runphp="yes"}
(@me=="")? @me=" class=&#39;hover&#39;":@me="";{/dede:field}>
<a href=&#39;{dede:global.cfg_cmsurl/}/&#39;><span>主页</span></a></li>
{dede:channel type=&#39;
top
&#39; row=&#39;10&#39; currentstyle="<li class=&#39;hover&#39;>
<a href=&#39;~typelink~&#39; ~rel~><span>~typename~</span></a></li>"}
<li><a href=&#39;[field:typeurl/]&#39; [field:rel/]><span>[field:typename/]</span></a></li>
{/dede:channel}</p>
<p>

dedecms template download address: www.php.cn/xiazai/code/dedecms

Above blue The code in bold color is to determine whether the current column is the home page. If it is the home page, add class='hover', otherwise it will not be added, so as to achieve the desired effect.

The above is the detailed content of Detailed introduction to the alternative method of invalid currentstyle parameter in the homepage navigation bar of Dedecms.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn