The most durable v9 two times to develop a professor to do a website, he put forward to the main navigation to a two level, I do not familiar with the v9 variables, Baidu a bit, mostly from a source, but, this two-level navigation, there is a problem (PS These people turned also do not test, is completely disorderly reproduced), later, I modified the error on this basis, and then in the style sheet, for its added style (no CSS style, said the perfect solution, Khan!). How do you live with the big guys who just copy and paste? ), say less nonsense, look below. 1, the. \phpcms\templates\default\content directory under the header.html open, the inside <map>........</map> between the code with the following code instead;
<map>{pc:content action=" category "catid=" 0 "num=" siteid= "$siteid" order= "Listorder ASC"}<ul class= "Nav-site" ><li><a href= "{SiteURL ($siteid)}" ><span> Home </ Span></a></li>{loop $data $k $v}<li class= "line" >|</li><li><a href= "{$v [url]}" ><span>{$v [catname]}</span><!--[if IE 7]><!--></a><!--<! [endif]--><!--[If LTE IE 6]><table><tr><td><! [Endif]--><ul>{pc:content action= "category" Catid= "$k" num= "siteid=" $siteid "order=" Listorder ASC "} { Loop $data $r} <li><a href= "{$r [url]}" >{$r [catname]}</a></li> {/loop}{/pc}</ul><!- -[if LTE IE 6]></td></tr></table></a><! [endif]--></li>{/loop}</ul>{/pc}{php Echo Runhook (' Glogal_menu ')}</map>
2. Locate the. \statics\css directory under the Default_blue.css file (if you change the theme, Brahma CSS style sheet), open, find/* navigation */CSS style, followed by the following CSS style;
/*zkadd*/.nav-site{list-style:none;}. Nav-site li {position:relative; z-index:200;}. Nav-site ul {visibility:hidden;position:absolute;left:3px;top:30px;}. Nav-site table {position:absolute; top:0; left:0;}. Nav-site li:hover ul,.nav-site a:hover ul{visibility:visible;}. Nav-site a:hover{background: #3a6ea5;}. Nav-site ul{ }.nav-site ul a{background-color: #6184a9; color: #ffffff; border-top:1px solid #7aa5d2; border-bottom : 1px solid #4e6a87; text-decoration:none;}. Nav-site ul li {clear:both;height:28px!important; line-height:28px!important; text-align:center;font-size:13px; List-style:none; }.nav-site ul Li a{display:block;width:138px;}. Nav-site ul Li a:hover{border-top:1px solid #7aa5d2; border-bottom:1px solid #4e6a87; background: #6d93bc;} /*zkadd-end*/
Ps:hack, can perfect support IE and other versions, as for the color style, the ability of children's shoes can change their own ...
Phpcms v9 Level Two drop-down menu implementation