Dla tych, którzy mają problemy z wyświetlaniem tego menu w IE (po zejściu z menu wysuwane menu pozostawało, style rollover również) - wystarczyło zmienić mały szczegół w pliku nav-h.js w linijce gdzie jest: this.className=this.className.replace(new RegExp(" iehover\b"), "");
trzeba usunąć \b a więc cała zawartość tego pliku powinna wyglądać następująco:
A co zmienić i gdzie, żeby kolejne menu były też poziome. Próbuję w pliku nav-h.css ale nie ma efektu. Może ktoś z Was wiem jak to zrobić?
link1 link2 link3
podmenu1 podmneu2
KOSIASZ
2009-09-10 09:36
Jeżeli ktoś chce menu rozsuwane po lewej stronie to chciałbym podzielić się moim sposobem ,na wstępie powiem że mogą być błędy więc poprawki mile widziane. Postanowiłem stworzyć nową kolumnę wchodzę do pliku config/lang.php i pod wierszem
$aMenuTypes[4] = 'Producenci';
dodać
$aMenuTypes[7] = 'Rozwijane Menu';
następnie w pliku templates\thrmes\default.php pod wierszem
Następnie tworzymy plik w templates o nazwie menu_7.tpl i wklejamy do niego
<!-- BEGIN LIST --><li class="l$aData[sStyle]"><a href="$aData[sLinkName]" $aData[sSelected]>$aData[sName]</a>$aData[sSubContent]</li><!-- END LIST -->
<!-- BEGIN HEAD --><div id="menu7"><div class="type">$aData[sMenuType]</div><ul id="menu7"><!-- END HEAD --> <!-- BEGIN FOOT --></ul></div><!-- END FOOT -->
<!-- BEGIN HEAD_SUB --><ul class="sub$aData[iDepth]"><!-- END HEAD_SUB --> <!-- BEGIN FOOT_SUB --></ul><!-- END FOOT_SUB -->
<!-- BEGIN SELECTED -->class="selected"<!-- END SELECTED -->
Po tym tworzymy pliki w templates jeden o nazwie nav-ha.css i wklejamy zawartość
ul#menu7 ul li { width: 175px; float: left; /*For IE 7 lack of compliance*/ display: block !important; display: inline; /*For IE*/ }
/* Root Menu */ ul#menu7 a { border-bottom:1px dashed #bcbaac; display:block; float:left; width:96%; padding:0 2%;
line-height:34px; text-decoration:none; height: auto !important; height: 1%; /*For IE*/ }
/* Root Menu Hover Persistence */ ul#menu7 a:hover, ul#menu7 li:hover a, ul#menu7 li.iehover a { background:url('img/nav.gif') left bottom; color:#970000;text-decoration:underline; }
/* 2nd Menu */ ul#menu7 li:hover li a, ul#menu7 li.iehover li a { float: none; background:background:url('img/nav.gif') left bottom; color: #000; }
/* 2nd Menu Hover Persistence */ ul#menu7 li:hover li a:hover, ul#menu7 li:hover li:hover a, ul#menu7 li.iehover li a:hover, ul#menu7 li.iehover li.iehover a { background: #CCC; color:#970000;text-decoration:underline; }
/* 3rd Menu */ ul#menu7 li:hover li:hover li a, ul#menu7 li.iehover li.iehover li a { background:url('img/nav.gif') left bottom; color: #000; }
/* 3rd Menu Hover Persistence */ ul#menu7 li:hover li:hover li a:hover, ul#menu7 li:hover li:hover li:hover a, ul#menu7 li.iehover li.iehover li a:hover, ul#menu7 li.iehover li.iehover li.iehover a { background: #CCC; color:#970000;text-decoration:underline; }
/* 4th Menu */ ul#menu7 li:hover li:hover li:hover li a, ul#menu7 li.iehover li.iehover li.iehover li a { background:url('img/nav.gif') left bottom; color: #000; }
/* 4th Menu Hover */ ul#menu7 li:hover li:hover li:hover li a:hover, ul#menu7 li:hover li:hover li:hover li:hover a, ul#menu7 li.iehover li.iehover li.iehover li a:hover ul#menu7 li.iehover li.iehover li.iehover li.iehover a { background: #CCC; color:#970000;text-decoration:underline; } /* 5rd Menu */ ul#menu7 li:hover li:hover li:hover li:hover li a, ul#menu7 li.iehover li.iehover li.iehover li.iehover li a { background:url('img/nav.gif') left bottom; color: #000; }
/* 5rd Menu Hover Persistence */
ul#menu7 li:hover li:hover li:hover li:hover li a:hover,
ul#menu7 ul, ul#menu7 ul ul, ul#menu7 ul ul ul, ul#menu7 ul ul ul ul { display: none; position: absolute; top: 0; left: 175px }
/* Do Not Move - Must Come Before display:block for Gecko */ ul#menu7 li:hover ul, ul#menu7 li:hover ul ul, ul#menu7 li:hover ul ul ul, ul#menu7 li:hover ul ul ul ul, ul#menu7 li.iehover ul, ul#menu7 li.iehover ul ul, ul#menu7 li.iehover ul ul ul, ul#menu7 li.iehover ul ul ul ul { display: none; }
ul#menu7 li:hover ul, ul#menu7 ul li:hover ul, ul#menu7 ul ul li:hover ul, ul#menu7 ul ul ul li:hover ul,
ul#menu7 li.iehover ul, ul#menu7 ul li.iehover ul, ul#menu7 ul ul li.iehover ul, ul#menu7 ul ul ul li.iehover ul { display: block; }
Could anyone tell me how to remove the dropdown from just one page in the menu? For example a news page as I don't want to list hundreds of articles in the menu.
Also can I fix the menu so it just shows one sub level in the dropdown?
Many thanks if anyone can help!
Simon
blume
2010-03-08 09:21
Hi simon1066,
the solution to my problem might help you as well.
1. dropdown only for certain pages from the menu this solution also helps collapsing the menu on the left again since the change of the file core/pages.php from...
Tak. Nie rób pierwszej zmiany w pliku core/pages.php w panelu admina w konfiguracji ustaw, że menu ma być rozwinięte na stałe i w pliku templates/themes/default.php ustaw limit odpowiedniemu menu na 1 (ostatnia zmienna w przypadku menu1 i menu2 domyślnie 0).