WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • SM2
  • Print
Pages: [1]   Go Down

Author Topic: SM2  (Read 11454 times)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
SM2
« on: October 12, 2021, 12:33:28 AM »
Hello,

I have page structure like this:
Code: [Select]
- A
- B
 - - C
 - - D
 - - - E
- F
Now I have this show menu call
Code: [Select]
$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 ?

Logged
Web developer

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1892
    • EFG MG
Re: SM2
« Reply #1 on: October 12, 2021, 10:10:01 AM »
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:
Code: [Select]
$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?
Logged
LG Harald

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

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: SM2
« Reply #2 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
Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: SM2
« Reply #3 on: October 12, 2021, 10:49:40 AM »
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
Logged
Web developer

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: SM2
« Reply #4 on: October 12, 2021, 11:02:11 AM »
Code: [Select]
$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>'
);
Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: SM2
« Reply #5 on: October 14, 2021, 10:23:52 AM »
Are there any new insights @crnogorac081 ?
Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: SM2
« Reply #6 on: October 14, 2021, 02:23:54 PM »
Yea it is working, soon I will publish bootstrap 5 template with example
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • SM2
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2