WebsiteBaker Support (2.8.x) > Templates, Menus & Design
#solved# SM2 challenge question: show siblings only from different menu's
Boudi:
Hi there,
Long time ago that I exhausted my brains out of a SM2 issue. But here it is;
I got 2 menu's. A topmenu and a main menu:
topmenu:
--- Code: ---<?php show_menu2(2,0,1,true,'[a] [menu_title]</a> |', '', '', ''); ?>
--- End code ---
main menu:
--- Code: ---<?php show_menu2(1, SM2_ROOT, SM2_START, false, false, false, '<ul id="header_menu" class="menu">'); ?>
--- End code ---
My intention is to show the siblings from a specified parent page from both menu's on a different location (so not pulldown). Here's the code from that one:
--- Code: ---<?php show_menu2(1, SM2_ROOT+1, SM2_CURR+1,true,'[a][menu_title][/a]','','','','',''); ?>
--- End code ---
The problem that I'm facing is that only the siblings from a page from the main menu are visible when clicking that page in the menu. Not the siblings from a parent page in the topmenu.
Already broke a leg from the SM2 documentation and demo's (never thought that I would need it again :-P) but reality is that I cannot pull it together....
Anyone? :?
Regards,
Boudi
Paul - Westhouse IT:
After trying many different options I've found the best way is to have everything in one WB menu, and split your menus out of there by setting SM2_ROOT to a page_id where needed.
Navigation is one area where WB falls down since each page can only be in one menu.
If you're trying to make a more complicated or larger site you're probably better off with a more flexible CMS since WB is designed for simple sites.
ruebenwurzel:
Hello,
--- Quote ---Navigation is one area where WB falls down since each page can only be in one menu.
--- End quote ---
Thats not really true. Using the included Menulink you can create for the second Menu the same Menupoint for a second ore more menues wich redirects to the linked page. This way you can very flexible decide wich pages you wanna have in wich menu.
Matthias
Paul - Westhouse IT:
I know about Menu Link, but that creates a second page that links to the first page. It's not the same as having one page in two menus. :)
For example, it negatively affects your page load speed, which can reduce your SE ranking.
Boudi:
Hi there,
Thnx for your answers. What Matthias said:
--- Quote ---Using the included Menulink
--- End quote ---
.
For the topmenu this is the case. Here's the structure:
topmenu:
page 1
page 2 - [menu link to subpage 1]
subpage 1
subpage 2
page 3
main menu:
page 1
page 2
subpage 1
subpage 2
page 3
The red area becomes not visible, the green area does when using the:
--- Code: ---<?php show_menu2(1, SM2_ROOT+1, SM2_CURR+1,true,'[a][menu_title][/a]','','','','',''); ?>
--- End code ---
code
Regarding the comment
--- Quote ---For example, it negatively affects your page load speed, which can reduce your SE ranking.
--- End quote ---
To be honest, my experiences are different. Websites we create with wb are in no time world ranked at ± 400.000 and have a >95% faster page load than other websites. So it's more the design and a good SEO writed engine behind it than rather a 'bad' menucall. But then again, this is may be a point of conversation that can be discussed in another thread. Always good to hear different thoughts though! :-)
Navigation
[0] Message Index
[#] Next page
Go to full version