SM2

crnogorac081

Yea it is working, soon I will publish bootstrap 5 template with example
Web developer

LudwigSt

Are there any new insights @crnogorac081 ?
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

LudwigSt


$open = '<li class="[class]"><a href="[url]" class="[class]">[menu_title]</a>'."\n";
show_menu2(

$aMenu          = 1,
$aStart         = SM2_ROOT,
$aMaxLevel      = SM2_ALL,
$aOptions       = SM2_ALL,

$aItemOpen      = $open,
$aItemClose     = '</li>'."\n",
$aMenuOpen      = '<ul>',
$aMenuClose     = '</ul>',
$aTopItemOpen   = false,
$aTopMenuOpen   = '<ul>'
);
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

crnogorac081

Can you post sm2 call pls

Quote from: LudwigSt on October 12, 2021, 10:41:45 AM
I have tested on WB 2.13.0r63 the menu-structure of crnogorac081 with the WB Default-Template and his SM2 call.

- B has got the class "menu-expand menu-sibling" and
- D has got the class "menu-expand menu-last".

After changing the Template from Default to a Bootstrap-Template it looks different:
- B has got the class "menu-expand menu-sibling" and
- D has got the class "menu-last". (Here is the "menu-expand" missing.

Then I changed the Template to a W3-Template and the behaviour is the same as under the WB Default-Template.

I suspect the reason lies in the template
Web developer

LudwigSt

I have tested on WB 2.13.0r63 the menu-structure of crnogorac081 with the WB Default-Template and his SM2 call.

- B has got the class "menu-expand menu-sibling" and
- D has got the class "menu-expand menu-last".

After changing the Template from Default to a Bootstrap-Template it looks different:
- B has got the class "menu-expand menu-sibling" and
- D has got the class "menu-last". (Here is the "menu-expand" missing.

Then I changed the Template to a W3-Template and the behaviour is the same as under the WB Default-Template.

I suspect the reason lies in the template
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

hgs

I don't know about showmenu2 unfortunately,

but I have a complex page with many sub-sub pages and everything is displayed to me,
The call looks like this:
$mainmenu = show_menu2(1, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_BUFFER, '<li class="[class] lev[level]"><a href="[url]" target="[target]" class="lev[level] [class]" data-pid=[page_id]><span>[menu_title]</span></a>', '</li>', '<ul>', '</ul>', false, false);
Maybe it helps you?
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

crnogorac081

Hello,

I have page structure like this:

- A
- B
- - C
- - D
- - - E
- F

Now I have this show menu call

$open = '<li class="[class]"><a href="[url]" class="[class]">[menu_title]</a>'."\n";
show_menu2(

$aMenu          = 1,
$aStart         = SM2_ROOT,
$aMaxLevel      = SM2_ALL,
$aOptions       = SM2_ALL,

$aItemOpen      = $open,
$aItemClose     = '</li>'."\n",
$aMenuOpen      = '<ul>',
$aMenuClose     = '</ul>',
$aTopItemOpen   = false,
$aTopMenuOpen   = '<ul>'
);


Now the problem is that in output, the item B, doesnt get class "menu-expand" but only "menu-sibling", and only D item has "menu-expand" class. Why is this happening ?

Web developer