![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 20.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
Witam ponownie,
Niestety na poprzednie pytania nie otrzymałem żadnej odpowiedzi ale naszczęście jakoś sobie poradziłem ![]() Mam teraz inny problem przy którym siedzę już trochę dłużej, chodzi o MenuMenager. Dokładniej chcę aby odnośnik w menu do strony głównej nie był linkiem a grafiką ( ikonka ), w tym celu musiałbym pewnie nadać temu konkretnemu odnośnikowi klasę lub identyfikator ale nie mam pojęcia jak to zrobić :/ Pomoże ktoś ? |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 433 Pomógł: 64 Dołączył: 29.01.2011 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Daj konkretny kod.
Nie masz pojęcia na temat czego? Nadawania klas elementom? Czy po prostu nie wiesz co tam wpisac? -------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 1 195 Pomógł: 109 Dołączył: 3.11.2011 Ostrzeżenie: (10%) ![]() ![]() |
@prowseed właśnie to jest zagadka.
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 20.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
Witam i dzięki za zainteresowanie tematem!
Więc może zacznę od początku ![]() Chodzi dokładnie o to że nie wiem jak nadać własne klasy lub identyfikatory dla wybranych odnosników w menu. Chciałbym np. aby struktura menu wyglądała tak : Kod <div id="menuwrapper"> <ul id="primary-nav"> <li id="wlasnyidentyfikator"><a href="#">Strona główna</a></li> <li id="kolejny"><a href="#">Inny link</a></li> <li><a href="#">Kolejny link</a></li> </ul> </div> A obecnie wygląda to tak : Kod <div id="menuwrapper"> <ul id="primary-nav"> <li class="menuactive"><a class="menuactive" href="#"><span>Link</span></a></li> <li><a href="#"><span>Link</span></a></li> <li><a href="#"><span>Link</span></a></li> </ul> </div> Bazuje na kodzie z cssmenu.tpl Kod {* CSS classes used in this template: #menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu. #primary-nav - The id for the <ul> .menuparent - The class for each <li> that has children. .menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *} {assign var='number_of_levels' value=10000} {if isset($menuparams.number_of_levels)} {assign var='number_of_levels' value=$menuparams.number_of_levels} {/if} {if $count > 0} <div id="menuwrapper"> <ul id="primary-nav"> {foreach from=$nodelist item=node} {if $node->depth > $node->prevdepth} {repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth} {elseif $node->depth < $node->prevdepth} {repeat string='</li></ul>' times=$node->prevdepth-$node->depth} </li> {elseif $node->index > 0}</li> {/if} {if $node->parent == true or $node->current == true} {assign var='classes' value='menuactive'} {if $node->parent == true} {assign var='classes' value='menuactive menuparent'} {/if} {if $node->children_exist == true and $node->depth < $number_of_levels} {assign var='classes' value=$classes|cat:' parent'} {/if} <li class="{$classes}"><a class="{$classes}" {elseif $node->type == 'sectionheader' and $node->haschildren == true} <li class="menuparent"><a class="menuparent"><span class="sectionheader">{$node->menutext}</span></a> {elseif $node->type == 'sectionheader'} <li><a ><span class="sectionheader">{$node->menutext}</span></a> {elseif $node->type == 'separator'} <li style="list-style-type: none;"> <hr class="menu_separator" /> {elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'} <li class="menuparent"><a class="menuparent" {else} <li> <a {/if} {if ($node->type != 'sectionheader' and $node->type != 'separator') or $node->parent == true or $node->current == true } {if $node->target}target="{$node->target}" {/if} href="{$node->url}"><span>{$node->menutext}</span></a> {/if} {/foreach} {repeat string='</li></ul>' times=$node->depth-1} </li> </ul> <div class="clearb"></div> </div> {/if} To chyba wszystko ![]() Jest to pierwszy CMS z jakim mam kontakt, sporo udało mi się już zrobić, można powiedzieć że strona jest na ukończeniu, zostało tylko menu. Chciałbym wiedzieć w jaki sposób dodaje się cms ms własne identyfikatory lub klasy dla wybranych odnośników w menu. Np. zamiast linku strona główna chcę aby była ikonką prowadząca na stronę główną itp. Nie wiem czy wystarczy coś wyedytować czy trzeba napisać od początku samemu. Pozdrawiam |
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 433 Pomógł: 64 Dołączył: 29.01.2011 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Nie znam tego systemu, więc moje rozwiązania mogą okazać się chodzeniem na około, ale coś się wymyśli.
Pokaż jak składujesz menu jeszcze. Rozumiem, że chcesz nadawać unikalne identyfikatory tylko dla pierwszego poziomu menu? -------------------- |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 08:46 |