Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
March 19, 2010, 01:40:03 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
WB 2.8.1 veröffentlicht!
Download und weitere Informationen gibt es
hier
.
110410
Posts in
15941
Topics by
9294
Members
Latest Member:
papirex
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderators:
Argos
,
BerndJM
)
show_menu2: valid XHTML and CSS selectable menus
Pages:
1
...
11
12
[
13
]
Author
Topic: show_menu2: valid XHTML and CSS selectable menus (Read 76819 times)
bupaje
Offline
Posts: 473
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #300 on:
July 23, 2009, 05:18:56 PM »
I have a minor css issue and wonder if someone sees something obvious. This menu looks good in FireFox and IE7 but in IE8, unless I use compatibility mode, the menu li renders odd - double bullets or the link is below and right of the li. I'm not sure if this is IE8's problem or the structure I have here.
Here's a page that uses this and following is the code
http://stormvisions.com/pages/library.php
Code:
$options = array('flags' => SM2_TRIM, 'notrim' => 1);
show_menu2(
$aMenu = 0,
$aStart = SM2_CURR+1,
$aMaxLevel = SM2_ALL,
$aFlags = SM2_ALLINFO|SM2_PRETTY,
$aItemOpen = '<li class="[class] button[page_id]"><a href="[url]" target="[target]" [if(level==0){class="topitem"}][if(level==1){class="subitem[page_id]"}]>[menu_title]',
$aItemClose = '</li>',
$aMenuOpen = '</a></li><ul>',
$aMenuClose = '</a></ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false,
$options
);
Logged
My Blog
,
My Site
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #301 on:
July 24, 2009, 02:13:23 AM »
I can see a few issues.
Your open menu and close menu tags are strange. Put the closing </a> in the item open. Get rid of the </li> from menu close. i.e. menu open = '<ul>' and menuclose is </ul>. Item open is <li> ..., Item close is </li>.
The $options array should replace the $aOptions (was called aFlags) parameter if you are wanting to use it. i.e.
$options = array('flags' =>SM2_ALLINFO|SM2_PRETTY|SM2_TRIM, 'notrim' => 1);
... $aOptions = $options, ....
Try that.
B
Logged
bupaje
Offline
Posts: 473
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #302 on:
July 24, 2009, 03:16:01 AM »
Thanks brofield. That's what I needed.
Logged
My Blog
,
My Site
pixotec
Offline
Posts: 2
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #303 on:
July 28, 2009, 10:02:43 PM »
I have defined multiple menues.
menu[3] is the "TopMenu" in two languages.
So I created
EN_TopMenu (Menu Link page) (level 0 in menu[3])
- Contact (level 1 in menu[3])
DE_TopMenu (Menu Link page) (level 0 in menu[3])
- Kontakt (level 1 in menu[3])
This menu is not in the path of the current page (let's say the homepage).
(So any use of SM2_CURR does not work).
I want to show only the TopMenu in the current language (EN -> Contact), so I tried:
Code:
<?php show_menu2
(
3
,
SM2_ROOT
+
1
,
SM2_START
,
SM2_ALL
,
'[li][a][menu_title]</a>[/li]'
,
''
,
''
,
''
,
false
,
false
);
?>
But I get both language links: Contact and Kontakt.
How to get only the TopMenu of the current language?
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #304 on:
July 29, 2009, 03:02:18 AM »
You can't. Use a single menu tree with hidden branches for your special menus. Then you will be on the path and it will work.
Logged
Stefek
Backend Theme Team
Online
Posts: 3188
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #305 on:
August 07, 2009, 06:15:21 PM »
@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.
http://www.websitebaker2.org/forum/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 }
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
}
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
Logged
Bowling in
Kiel
Halle
Aschaffenburg
"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #306 on:
August 10, 2009, 01:31:50 AM »
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:
http://www.websitebaker2.org/forum/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.
http://www.websitebaker2.org/forum/index.php/topic,2584.msg87606.html#msg87606
http://www.websitebaker2.org/forum/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
Logged
Stefek
Backend Theme Team
Online
Posts: 3188
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #307 on:
August 10, 2009, 02:51:45 AM »
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
«
Last Edit: August 10, 2009, 02:53:56 AM by Stefek
»
Logged
Bowling in
Kiel
Halle
Aschaffenburg
"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
ruebenwurzel
Leaders Team
Offline
Posts: 7211
Keep on Rockin
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #308 on:
August 10, 2009, 07:01:53 AM »
@brofield
Quote
If that is the case, than rather than adding a new option, the current change should be backed out.
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
Logged
You search for help, please look here:
Help-Page
You search for Modules, Templates or Languages, please look here:
Addons-Page
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #309 on:
August 10, 2009, 08:47:32 AM »
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.
Logged
Stefek
Backend Theme Team
Online
Posts: 3188
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #310 on:
October 14, 2009, 10:58:35 PM »
Hello,
Just testet version 4.9 but nothing different to 4.8
The Hidden Pages are still visible in the menu as soon as they're aktiv.
Kind Regards,
Stefek
Logged
Bowling in
Kiel
Halle
Aschaffenburg
"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
doc
Offline
Posts: 3579
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #311 on:
October 15, 2009, 07:59:14 AM »
Hi,
Brofield has suspended his support for show_menu2, so maybe the version on his website is not the latest one available. Think WB core team has taken over maintaining for show_menu2 now.
Doc
Logged
WebBird
Offline
Posts: 1711
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #312 on:
October 15, 2009, 10:34:57 AM »
Maybe it would be good to close this thread and open a new one for SM2 support.
Logged
I wanna go back to find the innocent days that I left behind... I still believe they're holding ground... behind the battle lines... (John Wetton)
Stefek
Backend Theme Team
Online
Posts: 3188
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #313 on:
October 15, 2009, 10:48:18 AM »
Hello,
version 4.9 is enclosed in WB 2.8 Final.
But I also used the one from his page - nothing different.
However - I know Brofield made a fantastic Job with this Function. It is so much better that the simple show_menu.
But the latest Change doesn't work properly.
I just used the 'hack' provided by user DarkViper and it works for me.
But there is still a need to implement this behavior into the official SM2 Snippet.
Regards,
Stefek
Logged
Bowling in
Kiel
Halle
Aschaffenburg
"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
WebBird
Offline
Posts: 1711
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #314 on:
October 15, 2009, 11:18:38 AM »
Open a bug report.
Edit: Here's the thread where brofield hands over show_menu2
http://www.websitebaker2.org/forum/index.php/topic,15050.0.html
Logged
I wanna go back to find the innocent days that I left behind... I still believe they're holding ground... behind the battle lines... (John Wetton)
Pages:
1
...
11
12
[
13
]
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
Loading...