Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 01:38:29 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
149639
Posts in
21099
Topics by
7538
Members
Latest Member:
ionline
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderator:
Argos
)
show_menu2: valid XHTML and CSS selectable menus
Pages:
1
2
[
3
]
4
5
...
13
Go Down
Author
Topic: show_menu2: valid XHTML and CSS selectable menus (Read 99435 times)
bupaje
Offline
Posts: 519
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #50 on:
March 11, 2006, 06:22:52 PM »
Quote from: brofield on March 11, 2006, 09:53:10 AM
font-weight is inherited by the child menus. Try
.menu-expand > a { font-weight: bold; }
This will only modify the <a> links directly underneath a .menu-expand classed tag and no children.
For some reason I couldn't get that to work -not sure if there was a typo? Don't know enough about css but I did get this to sort of work like this though when I get down 3 levels deep I note that bold is back ...
Code:
.menu-child{
background-color: #F3F3F3;
border : 1px solid #EEEEEE;
font-weight: normal;
}
.menu-current{
background-color: #DDDDDD;
border : 1px solid #16B144;
}
.menu-expand {
font-weight: bold;
}
Thanks again for this excellent mod.
«
Last Edit: March 11, 2006, 06:26:28 PM by bupaje
»
Logged
My Blog, My Site
Tim
Offline
Posts: 7
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #51 on:
March 13, 2006, 06:42:44 AM »
I managed to get it working Brofield, thanks again.
Logged
phil
Offline
Posts: 62
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #52 on:
March 28, 2006, 01:33:00 PM »
your menu function looks quite impressive: I'm trying to have a menu like this, where all the
home | study | about
is there a way to get this?
I only get it to look like
home | study | about
|
obviously, the red vertical bar at the end is ugly. Does anybody have a solution for this?
Thanks a lot
Logged
baelinc
Offline
Posts: 19
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #53 on:
March 29, 2006, 06:00:36 PM »
I am using this menu function, and i really like it. The only problem that i am having, is how to tell this code to be a horizontal menu instead of a vertical one. Here is the code that i am using, please edit it so that it shows as a horizontal menu....
Code:
<?php show_menu2
(
0
,
SM2_ROOT
+
1
,
SM2_START
)
?>
Thanks,
Johnathan
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Online
Posts: 7662
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #54 on:
March 29, 2006, 08:12:36 PM »
Hello,
how a menu is shown (horizontal, vertical) is css based. Look here.
http://css.maxdesign.com.au/listamatic/
Matthias
Logged
bupaje
Offline
Posts: 519
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #55 on:
April 03, 2006, 12:09:48 AM »
Want to use this for a sitemap and having a little problem getting it to show [page_title] instead of [menu_title]
Here is what I tried
show_menu2(0, SM2_CURR+1, SM2_CURR+1,'[a][page_title][/a]');
but it shows the [menu_title]
http://stormvisions.com/pages/art-design.php
Logged
My Blog, My Site
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #56 on:
April 03, 2006, 01:02:20 AM »
Documentation is at:
http://forum.websitebaker.org/index.php/topic,2584.0.html
Use [page] instead.
Cheers,
Brodie
Logged
bupaje
Offline
Posts: 519
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #57 on:
April 03, 2006, 01:29:35 AM »
Thanks. Looks like I was looking at an older doc. I did change it to [page] but it still shows the menu title.
I did have a suggestion for the future as well. Maybe you can add a feature to optional show the meta description/keywords as well. This can be useful in the sitemap for example where I can show the title and short description of each page. For example
Sitemap
Graphics
- Photoshop
- Plugins -
Add features to your program with these free plugins. [keywords:
art
,
design
]
Logged
My Blog, My Site
bupaje
Offline
Posts: 519
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #58 on:
April 11, 2006, 08:12:18 PM »
@brofield
I spotted this error in my scripts.log file. Not sure if it is important.
PHP Warning: array_keys(): The first argument should be an array in /modules/show_menu2/include.php on line 124
Logged
My Blog, My Site
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #59 on:
May 01, 2006, 06:30:35 AM »
I have released a
beta
of v3.0 at
http://code.jellycan.com/show_menu2/
This version has a call signature similar to the existing show_menu, however it is not a fully drop in replacement for it due to the problems I mentioned in my previous email. Let me know what problems you have with it.
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #60 on:
May 01, 2006, 06:38:07 AM »
Sorry, no easy solution that I can think of.
B
Quote from: phil on March 28, 2006, 01:33:00 PM
your menu function looks quite impressive: I'm trying to have a menu like this, where all the
home | study | about
is there a way to get this?
I only get it to look like
home | study | about
|
obviously, the red vertical bar at the end is ugly. Does anybody have a solution for this?
Thanks a lot
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #61 on:
May 01, 2006, 06:39:33 AM »
You are probably better to do this with the sitemap module. I will look to see what might be involved.
B
Quote from: bupaje on April 03, 2006, 01:29:35 AM
Thanks. Looks like I was looking at an older doc. I did change it to [page] but it still shows the menu title.
I did have a suggestion for the future as well. Maybe you can add a feature to optional show the meta description/keywords as well. This can be useful in the sitemap for example where I can show the title and short description of each page. For example
Sitemap
Graphics
- Photoshop
- Plugins -
Add features to your program with these free plugins. [keywords:
art
,
design
]
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #62 on:
May 01, 2006, 06:44:06 AM »
I've released version 2.6.1 which should clear this problem up. See
http://code.jellycan.com/show_menu2/
B
Quote from: bupaje on April 11, 2006, 08:12:18 PM
@brofield
I spotted this error in my scripts.log file. Not sure if it is important.
PHP Warning: array_keys(): The first argument should be an array in /modules/show_menu2/include.php on line 124
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #63 on:
May 02, 2006, 04:09:17 AM »
Quote from: phil on March 28, 2006, 01:33:00 PM
your menu function looks quite impressive: I'm trying to have a menu like this, where all the
home | study | about
is there a way to get this?
I only get it to look like
home | study | about
|
obviously, the red vertical bar at the end is ugly. Does anybody have a solution for this?
I take it back. Of course there is a way to do this. See the demo site at
http://code.jellycan.com/sm2test/
and have a look at the "Root Only (TEXT)" sample. Essentially you set the normal item to " | link" and set the first item to "link".
Cheers,
Brodie
Logged
kickarse
Offline
Posts: 64
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #64 on:
May 03, 2006, 04:09:26 PM »
Just curious if you thought about adding functionality such as this
(from your site
)
Code:
<div class="menu">
<ul class='menu-top'>
<li class='menu-sibling'><a href='http://code.jellycan.com' target='_top'>Home</a></li>
<li class='menu-sibling'><a href='http://code.jellycan.com/simpleopt/' target='_top'>SimpleOpt</a></li>
<li class='menu-sibling'><a href='http://code.jellycan.com/simpleini/' target='_top'>SimpleIni</a></li>
<li class='menu-sibling'><a href='http://code.jellycan.com/moji/' target='_top'>Moji</a></li>
<li class='menu-sibling'><a href='http://code.jellycan.com/langselect/' target='_top'>LangSelect</a></li>
<li class='menu-expand menu-current'><a href='http://code.jellycan.com/show_menu2/' target='_top'>show_menu2</a>
<ul><li class='menu-child'><a href='http://code.jellycan.com/sm2test/' target='_top'>Test</a></li></ul>
</li>
<li class='menu-sibling'><a href='http://code.jellycan.com/macros/' target='_top'>Macros</a></li>
<li class='menu-sibling'><a href='http://code.jellycan.com/comments/' target='_top'>Comments</a></li>
</ul>
</div>
Thought about giving the a href a class of what the name of the link is like so
Code:
<li class='menu-sibling'><a href='http://code.jellycan.com/comments/' class='comments'>Comments</a></li>
Something that would be populated by $page_id or $title ?
This would help if you wanted to style the link with pictures as navigation instead of text. Giving complete control over the menu look.
Logged
bupaje
Offline
Posts: 519
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #65 on:
May 04, 2006, 01:50:39 AM »
@brofield - no feedback on the beta until this weekend but I wanted to say the sitemap feature with the added description field is cool -just what I wanted.
Also thanks for picking up that arraykeys bug and for all your other work.
If you're still taking requests for future updates here's one I had a while back on my previous layout, but others have requested it. How about the ability to assign small 16x16 icons to the menu items. I did a messy hack on my old one where I simply did something like [page_name].jpg and save images named after each page but made for many duplicated images. I also did similar with page level ie [level].jpg (forget what the actually variables were called).
In my case all I originally wanted to have a different top level icon and color for each top level category
Graphics (paint_brush.gif)
News (newspaper.gif)
Then you could use a similar logo/color scheme on the page; this helps on a site with many types of content for the visitor to readily know what section they are in. In other words all art related pages are blue scheme, with paint brush logo (matching the menu icon) etc.
Anyway sorry for inflicting you with my rambling thought process.
This should be part of the WB core as it is absolutely excellent.
Logged
My Blog, My Site
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #66 on:
May 04, 2006, 02:05:42 AM »
@kickarse
You can already do something like this by using the [menu_title] as the class in the item format. You would want to keep all of your menu titles as single words I guess. In the next beta I will include a few extra items like page_id, parent_page_id, description, keywords. e.g.
Code:
"<a href='[url]' target='[target]' class='[menu_title]'>[menu_title]</a>"
@bupaje
I have no idea what you are wanting.
Regards,
B
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #67 on:
May 04, 2006, 03:48:20 AM »
Release of show_menu2, version 3.0 beta 2.
Changes in this version are:
added [description], [keywords], [page_id], [parent] (parent page id), [level] (page level) formatting options
all flag like options combined into a flags parameter (affects only people using numbered classes and descriptions or keywords
all formatting of the menu has been abstracted out into a formatting class which may be replaced by a caller with their own custom formatting class.
Details, demo and downloads at
http://code.jellycan.com/show_menu2/
Regards,
Brodie
«
Last Edit: May 04, 2006, 04:00:10 AM by brofield
»
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #68 on:
May 04, 2006, 04:08:25 AM »
Quote from: bupaje on May 04, 2006, 01:50:39 AM
In my case all I originally wanted to have a different top level icon and color for each top level category
Graphics (paint_brush.gif)
News (newspaper.gif)
If you use the new 3.0 version then you could use the [level] or [page_id] formats set the class or link id. To do class based images though, you should be able to do it with the current version and CSS selectors. See
http://css.maxdesign.com.au/listutorial/master.htm
Cheers,
Brodie
Logged
virgil
Offline
Posts: 177
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #69 on:
May 04, 2006, 01:09:33 PM »
@brofield
Hi Brodie
I would like to use your show_menu2 snippet to create a Sitemap with
description + keywords like shown in your demo page.
I guess that -to create a normal menu- you put a regular php-call of show_menu2
in the index(.)php file, which will create the menu call on
every
page of your site
... but...
I want a
sitemap
to be shown only on a
single page
- How can I do that?
- Wich release of the snippet do I at least nee?
Thx for answers...
Regards,
Virgil
Logged
Virgil - the pre-baked-stuff baker -
)
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #70 on:
May 04, 2006, 01:59:31 PM »
Quote from: virgil on May 04, 2006, 01:09:33 PM
I guess that -to create a normal menu- you put a regular php-call of show_menu2
in the index(.)php file, which will create the menu call on
every
page of your site
... but...
I want a
sitemap
to be shown only on a
single page
- How can I do that?
Instead of wysiwyg, choose Code for the page type. Then write the call to show_menu2 directly into the page. I have created a demo of this at
http://code.jellycan.com/sm2test/pages/site-map.php
Quote from: virgil on May 04, 2006, 01:09:33 PM
- Wich release of the snippet do I at least nee?
v3.0 to get keywords and descriptions. Ensure that you pass SM2_DESCKEY in the flags. For example the code I used in the sample page is...
Code:
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_DESCKEY,
'<span class="stuff">[a][page_title][/a] (menu: [a][menu_title][/a])'.
'<br /><i>[description]</i><br />([keywords])</span>',
"<ul class='sitemap'>",'</ul>','<li>','</li>',false,false);
Cheers,
Brodie
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #71 on:
May 04, 2006, 02:07:07 PM »
Release of show_menu2, version 3.0 beta 3.
Changes:
added trial support for legacy functions show_menu() and page_menu()
Details, demo and downloads at
http://code.jellycan.com/show_menu2/
Currently these functions are named sm2_show_menu and sm2_page_menu so that I can test them side by side. See the bottom of the test page for some demos. Basically, it isn't working. I don't quite understand the results that I am getting out of show_menu. It seems like it is not rendering the menus like it's call signature says it should. If someone can have a look and give me comments on if the results I see there are what you expect. Perhaps a few more examples to work with.
However, there is never going to be 100% backward compatibility with those functions without keeping the existing code. I don't see why we don't just do that. Just add show_menu2 to the main distrib and encourage template writers to use it. If you want to get rid of the original functions in the future then do so.
In any case, this is the last release / bugfix for a few weeks. Enjoy.
Regards,
Brodie
Logged
virgil
Offline
Posts: 177
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #72 on:
May 04, 2006, 03:27:08 PM »
@brofield
Hi again
Quote from: brofield on May 04, 2006, 01:59:31 PM
Instead of wysiwyg, choose Code for the page type.
Then write the call to show_menu2 directly into the page.
It's exactly what I did before posting my question (nice t see that I was on te right way)
but it doesn't work...
I get:
Code:
Parse error: parse error, unexpected T_STRING
in /home/httpd/vhosts/mydomain.com/httpdocs/modules/code/view.php(30) : eval()'d
code on line 5
My entry in in the Code page was
Code:
<?php
show_menu2
(
0
,
SM2_ROOT
,
SM2_ALL
,
SM2_ALL
|
SM2_DESCKEY
,
'<span class="stuff">[a][page_title][/a] (menu: [a][menu_title][/a])'
.
'<br /><i>[description]</i><br />([keywords])</span>'
,
"<ul class='sitemap'>"
,
'</ul>'
,
'<li>'
,
'</li>'
,
false
,
false
);
?>
(BTW: After saving the page the "
<?php
" and the "
?>
" disappears; is this OK?)
What do I do wrong?
Thx for your reply
Regards,
Virgil
Logged
Virgil - the pre-baked-stuff baker -
)
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #73 on:
May 04, 2006, 04:19:55 PM »
Just put the call to show_menu2. You can't use <?php ?> in a code page.
B
Logged
virgil
Offline
Posts: 177
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #74 on:
May 04, 2006, 11:00:12 PM »
Hi Brodie
Thx for reply.
I've put ONLY this in a code page:
Code:
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_DESCKEY,
'<span class="stuff">[a][page_title][/a] (menu: [a][menu_title][/a])'.
'<br /><i>[description]</i><br />([keywords])</span>',
"<ul class='sitemap'>",'</ul>','<li>','</li>',false,false);
... we're on the good run
.... BUT
...
I get the following now (EXACTLY what you see... Codes, but no content):
(BTW: the links
[page_title]
and
[menu_title]
are working correctly)
Code:
<
class='menu-top
'>< class='
menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-expand'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>>>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-expand'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-expand menu-sibling'>[page_title] (menu: [menu_title])
[description]
([keywords])<
class='
'>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>< class='
'>[page_title] (menu: [menu_title])
[description]
([keywords])>>>< class='
menu-current'>[page_title] (menu: [menu_title])
[description]
([keywords])>>
There must still be sme tiny mistake, but as I'm definitly not a coder... aehm... sorry... could you help once more?
Sorry if I'm abusing you being so pacient.
Regards,
Virgil
Logged
Virgil - the pre-baked-stuff baker -
)
Pages:
1
2
[
3
]
4
5
...
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...