Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 06:17:53 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
149621
Posts in
21098
Topics by
7537
Members
Latest Member:
lotte2
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderator:
Argos
)
show_menu2: valid XHTML and CSS selectable menus
Pages:
1
...
3
4
[
5
]
6
7
...
13
Go Down
Author
Topic: show_menu2: valid XHTML and CSS selectable menus (Read 99364 times)
peppelorum
Offline
Posts: 2
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #100 on:
July 03, 2006, 09:17:53 AM »
Added two short snippets so that the root items gets a class of their own.
Logged
travisfisher
Offline
Posts: 1
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #101 on:
July 05, 2006, 02:48:26 PM »
What is the best approach for a site that has the need for the default menu CSS (menu-top, etc.) for multiple menus (1,2,3)?
Logged
kweitzel
Forum administrator
Offline
Posts: 6819
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #102 on:
July 05, 2006, 05:41:39 PM »
wrap the menus in different DIVs ... for design check out css.maxdesign.com.a
u they have listamatic and listamatic2 (1 for simple lists and 2 for nested lists).
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
succhi
Offline
Posts: 72
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #103 on:
July 06, 2006, 02:55:18 AM »
You can also add your own 'id' to the first element without having to wrap. e.g. <ul id="topbar">... and another could be <ul id="sidebar">...
Stuart.
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #104 on:
July 11, 2006, 10:09:48 AM »
Quote from: peppelorum on July 03, 2006, 09:17:53 AM
Added two short snippets so that the root items gets a class of their own.
You don't need this change. You can do this using the original show_menu2. Try supplying the SM2_NUMCLASS flag and then root items will have the menu-0 class. Or without using the SM2_NUMCLASS flag, you add the menu level in the format string manually. For example, something like "<li class='menu-[level] [class]'>". Again root items with have the menu-0 class.
B
Logged
marccouture
Offline
Posts: 216
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #105 on:
July 28, 2006, 01:54:17 PM »
Hi,
Reading through this thread, I haven't come across a non-coders' perspective on using this snippet. Can someone explain how to integrate this in, say, the Simple template that is included in WB and change the default display of the left-hand side menu?
Thanks!
Logged
Marc C.
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7660
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #106 on:
July 28, 2006, 06:44:29 PM »
Hello,
using this replacement function is very easy. Download the last version, install the zip file as a modul and replace the menu call in the template (show_menu, page_menu or menu) with show_menu2. Thats all. If there are some arguments in the brackets after the call ( f.e. (0,1,1) you can use this with the replacement function too without any problems. To get the whole functions working it is better to replace this arguments with the new ones. Look at the readme.txt wich comes with the modul.
With these arguments you can change f.e. the default display of the left-hand side menu. So if you can describe what you want i'm pretty shure we can give you some hints. It's really not difficult because very logical structured.
Matthias
Logged
berndn
Offline
Posts: 14
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #107 on:
July 31, 2006, 11:40:51 AM »
I like it and have only one problem.
Can this be implemented
http://examples.codecharge.com/CCSExamplePack2/VerticalCSSMenu/VCSSMenu.php
?
I have serious trouble with this.
Can someone help ?
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7660
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #108 on:
July 31, 2006, 12:13:31 PM »
Hello,
what's your problem with this?
Matthias
Logged
berndn
Offline
Posts: 14
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #109 on:
July 31, 2006, 12:24:48 PM »
I want to create this kind of list:
Code:
<div id=menu><ul id=menuList><li><a href="#" name="submenu" class="submenu">Products</a><ul><li><a href="#">All</a></li>
<li><a href="#">CodeCharge</a></li>
<li><a href="#">CodeCharge Studio</a></li>
<li><a href="#">DemoCharge Studio</a></li>
<li><a href="#" name="submenu" class="submenu">Comparison</a><ul><li><a href="#">CodeCharge Studio</a></li>
<li><a href="#">DemoCharge Studio</a></li></ul></li>
</ul></li>
But all my tries lead to garbish
Anyway to dump the show_menu2 output into an php array or is this to complicated
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #110 on:
July 31, 2006, 03:57:21 PM »
Quote from: berndn on July 31, 2006, 12:24:48 PM
I want to create this kind of list...
But all my tries lead to garbish
Please read the documentation at
http://code.jellycan.com/show_menu2/
In any case, that looks pretty much like the default output. Exactly what are you trying to do that is different to the default? If you want the class="submenu" when the menu has sub-menus then you just need to change your code to expect the class "menu-expand" and there you have it. There is no easy way to get the name="submenu" added when there is a submenu without writing your own output function. See legacy.php in the sm2 zipfile download for an example of a custom output function.
Quote from: berndn on July 31, 2006, 12:24:48 PM
Anyway to dump the show_menu2 output into an php array or is this to complicated
Again, have a look at writing your own custom output function if you really want it output as an array. I expect that you are looking to over-engineer the problem though. You just need to read the documentation better.
Give us a clear explanation of the problem and we might be able to help you.
Regards,
Brodie
Logged
berndn
Offline
Posts: 14
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #111 on:
August 01, 2006, 08:52:42 AM »
Thanks for the tips so far. I would need the name="submenu" for the javascript which is needed for Internet Explorer.
I looked into the legacy.php but I'm not sure how to use it. I enable the legacy.php with the include.
After I do this what has changed. Do I need to call show_menu2 with what parameters or what do I have to do ?
If you wish we can talk about this via email or pm instead of me asking silly question in this thread
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #112 on:
August 01, 2006, 03:52:18 PM »
Version
3.5
now available at
http://code.jellycan.com/show_menu2/
Added
conditional formatting
. Only add attributes, classes, tags, etc when specific conditions are met for that menu item, like if it has a particular class, if it has a particular level, etc. Ssee the documentation for complete details. Examples using the conditional formatting can be found at the demo site
http://code.jellycan.com/sm2test/
(search for "Conditional")
New flag
SM2_PRETTY
to output the menu HTML formatted with indents for ease of debugging
B
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #113 on:
August 01, 2006, 03:54:59 PM »
A custom output class takes callbacks from the sm2 menu engine and formats that data for output. The legacy.php file defines a new function sm2_show_menu() which attempts to recreate the call signature of the show_menu() function using a custom output class. It is an example of how to call show_menu2 with a custom output class, not a final solution for you.
Instead use show_menu2 version 3.5 and use the conditional formatting. See the
http://code.jellycan.com/sm2test/
website, "Conditional" for an example of what you want to do.
B
Logged
berndn
Offline
Posts: 14
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #114 on:
August 01, 2006, 05:58:36 PM »
Thanks a lot for your explanation. I wasn't sure that it was so easy to use the custom output filter in the version I used. Thanks for this
And thanks a lot for the new version. Will try it
Logged
marccouture
Offline
Posts: 216
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #115 on:
August 03, 2006, 05:50:46 PM »
brofield, you are a life saver. Excellent work, thank you very much!
Logged
Marc C.
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #116 on:
August 15, 2006, 09:18:15 AM »
Version 3.6 now available at
http://code.jellycan.com/show_menu2/
New flag SM2_SIBLING to output only the parents and siblings of the current menu
B
Logged
valerie
Offline
Posts: 156
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #117 on:
August 20, 2006, 09:42:39 PM »
Can showmenu2 work on a multi-level css menu? The one I'm looking at is by stu nicholls found here:
http://www.cssplay.co.uk/menus/final_drop2.html
I can figure out one level but beyond that I'm not sure...
Here's the xhtml:
Code:
<ul>
<li><a class="drop" href="../menu/index.html">DEMOS<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
<ul>
<li><a href="../menu/zero_dollars.html" title="The zero dollar ads page">zero dollars advertising page</a></li>
<li><a href="../menu/embed.html" title="Wrapping text around images">wrapping text around images</a></li>
<li><a href="../menu/form.html" title="Styling forms">styled form</a></li>
<li><a href="../menu/nodots.html" title="Removing active/focus borders">active focus</a></li>
<li><a class="drop" href="../menu/hover_click.html" title="Hover/click with no active/focus borders">hover/click with no borders
<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
<ul>
<li><a href="../menu/form.html" title="Styling forms">styled form</a></li>
<li><a href="../menu/nodots.html" title="Removing active/focus borders">removing active/focus borders</a></li>
<li><a href="#nogo">FLYOUT third level »<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
<ul>
<li><a href="#nogo">Third level-1</a></li>
<li><a href="#nogo">Third level-2</a></li>
<li><a href="#nogo">Third level-3</a></li>
<li><a href="#nogo">Third level-4</a></li>
</ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>
<li><a href="../menu/hover_click.html" title="Hover/click with no active/focus borders">hover/click</a></li>
</ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>
<li class="upone"><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></li>
<li><a href="../menu/old_master.html" title="Image Map for detailed information">image map for detailed information</a></li>
<li><a href="../menu/bodies.html" title="fun with background images">fun with background images</a></li>
<li><a href="../menu/fade_scroll.html" title="fade-out scrolling">fade scrolling</a></li>
<li><a href="../menu/em_images.html" title="em size images compared">em image sizes compared</a></li>
</ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>
Logged
http://www.robcomm.net
--editing and proofreading for American English
--print and web publication management
--graphic and web design, including original photography
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #118 on:
August 20, 2006, 11:44:36 PM »
You might be able to do something like that using conditions, but it looks like a pretty messy menu. Try one of the other CSS menus that don't need all of the table guff that this one does. An example using UDM is on the sample site. There are plenty of others too.
B
Logged
Francisco
Offline
Posts: 65
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #119 on:
August 24, 2006, 06:06:32 AM »
Hi there,
I have just installed this module, changed my template to have:
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, "\n</li>", false, false, false, '<ul class="udm" id="udm">');
instead of "SHOW_MENU"
I get a list of pages in bare HTML, seems like the CLASS is missing. I am attaching a screenshot, for privacy reasons I blanked out the page names and everything that can be used to track the website using google.
Excuse me my ignorance, but did I missed any steps? ~ I just changed the template menu code... maybe I didn't do it right.
But I checked the source code of your DEMO page, it seems like you use JAVA SCRIPT... I don't know where to get those to get UDM working...
This is what I modified/added in template:
Code:
<td width="100%" style="height: 173px">
<?php
if(
SHOW_MENU
) {
/* Only shown menu if we need to */
?>
<?php show_menu2
(
0
,
SM2_ROOT
,
SM2_ALL
,
SM2_ALL
,
false
,
"\n</li>"
,
false
,
false
,
false
,
'<ul class="udm" id="udm">'
);
?>
<?php
}
?>
</td>
Thanks
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #120 on:
August 24, 2006, 06:18:58 AM »
See the UDM website linked from that demo for details of how to set it up. My demo page is just showing that it can be used with sm2.
http://www.udm4.com/
B
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #121 on:
August 24, 2006, 07:04:27 AM »
Version 3.7 now available at
http://code.jellycan.com/show_menu2/
Call htmlspecialchars on all strings to ensure that the output menu items are valid HTML.
Added new flag SM2_NOESCAPE to turn off this escaping if it isn't desired.
B
Logged
Francisco
Offline
Posts: 65
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #122 on:
August 24, 2006, 07:07:58 AM »
Quote from: brofield on August 24, 2006, 06:18:58 AM
See the UDM website linked from that demo for details of how to set it up. My demo page is just showing that it can be used with sm2.
http://www.udm4.com/
B
Sorry for being a pain.
http://www.udm4.com/licensing/download/
- I get the .zip from there.
Now what do I need to upload/modify in the Template? If you can tell me the basic things that have to be done to get a standard UDM menu it will help me get an idea of what I need to do.
I just need the basic steps after downloading the .zip ... if you could, please tell me.
Thanks
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #123 on:
August 24, 2006, 07:21:12 AM »
Do your own work. See the UDM site. Read the manual.
http://www.udm4.com/manual/quickstart/
Logged
ami
Offline
Posts: 27
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #124 on:
August 27, 2006, 10:24:07 AM »
Hi Brodie, hi all
really a great snippet. I got it to work as I want:
One vertical menu for the root, a second menu for the root+1. I took the code from your demopage:
Code:
<div class="root">
<?php show_menu2
(
0
,
SM2_ROOT
,
SM2_START
);
?>
</div>
<div class="second-menu">
<?php show_menu2
(
0
,
SM2_ROOT
+
1
,
SM2_START
);
?>
</div>
To get it correct for xhtml strict (without target=...) I changed $aItemOpen like this:
Code:
<?php show_menu2
(
0
,
SM2_ROOT
,
SM2_START
,
SM2_PRETTY
,
'[li]<a href="[url]">[menu_title]</a>'
);
?>
Then there is a mistake I do not understand - what I am coding wrong?
-> On
every
page I see the children of
all
root-entries in the second menu, for every entry of root a complete UL.
The same, if I just use the flag SM_PRETTY (no other $aItemOpen). Is there something I don't see?
Only your demo like above shows the correct children of root depending to the actual page.
Thank you for this modul - may be you can identify my mistake.
Axel
Logged
Pages:
1
...
3
4
[
5
]
6
7
...
13
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...