#solved# SM2 challenge question: show siblings only from different menu's

Boudi

Finally, after almost a week I found the solution! Here are the codes (include personal styling)

Top menu:
<?php show_menu2(2,SM2_ROOTSM2_START,true,'[a][menu_title][/a]&nbsp;&nbsp;&#38;#8226;&nbsp;&nbsp;','','','','',''); ?>

Main menu:
  <?php show_menu2(1SM2_ROOTSM2_STARTfalsefalsefalse'<ul id="header_menu" class="menu">'); ?>


SM2 code to show the childs from a specified parent page from both menu's on a different location (so not pulldown). Here's the code from that one:

<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREE,'[a]<br /><span class="block"> &#38;#9632; </span> [menu_title][/a]','','','','',''); ?>

Don't forget to point the childs to the same menu as the parent in the configuration of this page. (eg: top menu)

Regards,

Boudi

PS: I want to thank Paul and Klaus for offering their help!
...:: Bake the Unbakable ::...

Paul - Westhouse IT

Westhouse IT - Professional WebsiteBaker developers for hire.

Boudi

I think the best way is to experience it by yourself. I can PM you for the url if you like.
...:: Bake the Unbakable ::...

Paul - Westhouse IT

Okay, how's this:

Home
P1
--PP1
----PPP1
----PPP2
--PP2
--PP3
P2
--PP4
--PP5
P3

So, out of that, what you you want for the third menu?
Westhouse IT - Professional WebsiteBaker developers for hire.

Boudi

QuoteHave you tried putting every page into one menu and then rooting the first two menus by page_id to get those.

Yes I did. The problem that comes up is that from 1 menu the childs are getting visible on the other location. It seems (correct me if I'm wrong) that SM2 cannot handle this structure in order to achieve to show the childs only from different ID menu's. Looks like it's conflicting with itself.

I worked with hidden ID's too, same issue.

Regarding the full menu structure, I can give a screenshot, but since I changed the structure so many times in order to get it to work what you see is just 1 menu with some pages with childs. :)
...:: Bake the Unbakable ::...

Paul - Westhouse IT

Have you tried putting every page into one menu and then rooting the first two menus by page_id to get those.

And for the final one to use conditional formatting to assign an "invisible" class to items you don't want so the rest show.

Again, I can't give a clear answer since I can't see the full menu structure from here.
Westhouse IT - Professional WebsiteBaker developers for hire.

Boudi

Ok. I give up. After tens of hours testing I come to the solution that what I want is simply not possible.

With SM2 it's not possible to:

- create seperate 1 level deep menu's from 1 menu
- to show only siblings/childs  from multiple menu's on a different location

Reason why this is so important is when it WAS possible I don't have to create 7 different templates. My intention is to create a website with only 1 template in which the menu's and siblings create the structure.

Still hope for a solution.

Regards,

Boudi


...:: Bake the Unbakable ::...

Boudi

QuoteIt still sounds like the best way is to have all in one WB menu and pull out just what's needed for each page menu.

I will try this option. Don't cost loads of time and who knows :)
...:: Bake the Unbakable ::...

Paul - Westhouse IT

I think it would really help if you gave your full page structure and highlighted which things need to be in which menus. It still sounds like the best way is to have all in one WB menu and pull out just what's needed for each page menu.
Westhouse IT - Professional WebsiteBaker developers for hire.

Boudi

Thnx for your comments :)

But I think this is another topic. What I need is a solution for my problem. And I think this can be done by SM2. But I need help.

Boudi
...:: Bake the Unbakable ::...

Paul - Westhouse IT

#7
Boudi

You're right, page speed isn't the most important factor in good SEO, it's just one of things involved. But would you want to add an extra time and server load unnecessarily?

Edit: I'll have a look at your sm2 issue after lunch. :)


Matthias

I'll show you what I mean. Have a look at the attached image for the http requests involved. A request is always involved, even if the page is cached. WB is designed such that a menu link page is a php file that contains something like this:

<?php
$page_id = 75;
require("../config.php");
require(WB_PATH."/index.php");
?>

This file has to be requested, the details retrieved from the DB, and then the redirect to the new page happens.

It should be noted that this is different from using a standard (non-R) Apache redirect, as a standard redirect doesn't involve an extra page request.

[gelöscht durch Administrator]
Westhouse IT - Professional WebsiteBaker developers for hire.

ruebenwurzel

@Paul - Westhouse IT

Quote...but that creates a second page that links to the first page...

This is also not true. It only creates a redirect.

Matthias

Boudi

Hi there,

Thnx for your answers. What Matthias said:
QuoteUsing the included Menulink
.

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:
<?php show_menu2(1SM2_ROOT+1SM2_CURR+1,true,'[a][menu_title][/a]','','','','',''); ?>
code

Regarding the comment
QuoteFor example, it negatively affects your page load speed, which can reduce your SE ranking.
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! :-)
...:: Bake the Unbakable ::...

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.
Westhouse IT - Professional WebsiteBaker developers for hire.

ruebenwurzel

Hello,

QuoteNavigation is one area where WB falls down since each page can only be in one menu.

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

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.
Westhouse IT - Professional WebsiteBaker developers for hire.

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:
<?php show_menu2(2,0,1,true,'[a]&nbsp;&nbsp;[menu_title]</a>&nbsp;&nbsp;|'''''''); ?>

main menu:
<?php show_menu2(1SM2_ROOTSM2_STARTfalsefalsefalse'<ul id="header_menu" class="menu">'); ?>

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:

<?php show_menu2(1SM2_ROOT+1SM2_CURR+1,true,'[a][menu_title][/a]','','','','',''); ?>

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
...:: Bake the Unbakable ::...