WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
Stefek:
@Brofield.
Some Users have had some troubles due to the fact that with the latest version of SM2 the "Hidden Pages" are visible in the menu if active.
User "DarkViper" opened this german discussion to provide a workaround.
https://forum.WebsiteBaker.org/index.php/topic,14772.msg93640.html#msg93640
Most of us are interrested in a inclusion of this workaround to the next SM2 Version.
It was good if this could happen soon, so the Dev Team would integrate those changed version into the WB CMS 2.8 Package.
"DarkViper" has two approaches to handle this.
One needs the $aOptions Parameter "SM2_HIDEPAGES" to work
/show_menu2/include.php
--- Code: ---044 define('SM2_CURRTREE', 0x0400); // bit 10
045 // Begin MOD by ISTeam, Werner von der Decken, 08.2009
046 define('SM2_HIDEPAGES', 0x0800); // bit 11 (reactivate old behavior and dosn't show hidden pages)
047 // END MOD ---
048 define('_SM2_GROUP_1', 0x000F); // exactly one flag from group 1 is required
.
.
.
574 // mark our current page as being on the current path
575 if ($page['page_id'] == $CURR_PAGE_ID) {
576 $page['sm2_is_curr'] = true;
577 $page['sm2_on_curr_path'] = true;
578 // Begin MOD by ISTeam, Werner von der Decken, 08.2009
579 if (($flags & SM2_HIDEPAGES) == 0){
580 unset($page['sm2_hide']); // don't hide the current page
581 }
582 // END MOD ---
583 }
--- End code ---
And the second one needs the $aOptions Parameter "SM2_SHOWHIDDEN"
--- Code: ---define('SM2_SHOWHIDDEN', 0x0800); // bit 11 (set to show hidden pages)
… …
$page['sm2_is_curr'] = true;
$page['sm2_on_curr_path'] = true;
if (($flags & SM2_SHOWHIDDEN) != 0){
unset($page['sm2_hide']); // don't hide the current page
}
--- End code ---
Please would you consider to include one of this solutions?
Also a small comment by "$aOptions" Parameters here where good afterwards:
http://code.jellycan.com/files/show_menu2-README.txt
I hope you have the time to do this right now (or soon).
Please let us know.
Kind Regards,
Stefek
brofield:
Hi Stefek,
I have just been sitting on this waiting for someone to come up with a consensus on what they want done.
The original change was based on this person's report:
https://forum.WebsiteBaker.org/index.php/topic,2584.msg82237.html#msg82237
I asked for people's opinion a few times, but didn't get a satisfactory answer as to why it should be one way or another.
https://forum.WebsiteBaker.org/index.php/topic,2584.msg87606.html#msg87606
https://forum.WebsiteBaker.org/index.php/topic,14117.msg89044.html#msg89044
However, on reading that German thread it seems that the following is true:
* hidden pages should always be hidden and not appear in the menu tree
* if "hidden pages" are desired to be shown in the menu tree then they should be private pages
If that is the case, than rather than adding a new option, the current change should be backed out.
Does that seem reasonable?
B
Stefek:
Hello Brofield.
Yes, it sounds reasonable. It makes the code faster, I guess.
I don't really get, what user "vanbemmel" meant and what he was trying to achieve.
This subject is pretty confusing.
What I can see, this user had have more then one menus (different SM2 calls in the template).
One for the parents, and one for the childs.
Let's assume, the parents has been horizontally arranged, the childs verically.
Then, let's assume, one of the parents is "hidden" and you have access to this parent only through the content (a link in the content area linking to that hidden page).
This hidden page has childs and he wants to show them in the vertically arranged menu.
If this is true, I don't get why he didn't get there.
I have a lot of templates arranged like this with hidden pages and it always worked with the "old" show_menu2.
So I understand that a lot of people are confused about this issue.
Regards,
Stefek
ruebenwurzel:
@brofield
--- Quote ---If that is the case, than rather than adding a new option, the current change should be backed out.
--- End quote ---
1.) I vote for the handling of hidden pages like in show_menu 4.7
2.) Can you release a Version 4.9 wich works like 4.7 and wich can be added to WB 2.8. But it would be nice to have this tonight, cause we cannot wait longer with relasing the WB 2.8 final.
Thanks
Matthias
brofield:
4.9 release with default behaviour of 4.7 and using SM2_SHOWHIDDEN to override to get 4.8 behaviour.
http://code.jellycan.com/show_menu2/
It would be nice if you would request changes and releases with more notice in future.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version