WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 08.08.2020 10:02:26

herbi
Member

ShowMenu2

Servus,

eine Frage, wo muss ich die Classe "active-item" eintragen, damit mir die aktuelle Seite hervorgehoben angezeigt wird?

$mainnav = show_menu2(
		$aMenu          = 1,
		$aStart         = SM2_ROOT,
		$aMaxLevel      = SM2_ALL,
		$aOptions       = SM2_ALL|SM2_PRETTY|SM2_BUFFER,
		//$aItemOpen      = '<li><a href="[url]" class="[class]" target="[target]">[menu_title]</a>',
		$aItemOpen      = '<li><a [if (level==0 && class==menu-expand){class="dropdown-trigger [class]" href="#!" data-target="dropdown[page_id]"} else {href="[url]" class="[class]" target="[target]"}]>[menu_title][if (level==0 && class==menu-expand){<span class="fa fa-caret-down fa-fw"></span>}]</a>',
		$aItemClose     = '</li>',
		$aMenuOpen      = '<ul>',
		$aMenuClose     = '</ul>',
		$aTopItemOpen   = false,
		$aTopMenuOpen   = '<ul class="right chevron">'
	  );

Dankeschön


Jeder meint, seine Wahrheit ist die Richtige.  smile

Offline

#2 08.08.2020 12:25:59

florian
Administrator

Re: ShowMenu2

Versuch mal so

...
        $aItemOpen      = '<li><a [if (level==0 && class==menu-expand){class="dropdown-trigger [class]" href="#!" data-target="dropdown[page_id]"} else {href="[ url]"  target="[target]"}] [if (class==menu-current) { class="active-item"}]>[menu_title][if (level==0 && class==menu-expand){<span class="fa fa-caret-down fa-fw"></span>}]</a>',
...

nicht getestet.

Andere Möglichkeit: Im Stylesheet anpassen:

...
.active-item, .menu-current { ... }
...

Offline

Liked by:

herbi

Board footer

Powered by FluxBB

up