Joomla 1.0 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
Joomla 1.5 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
|
Accordion Menu Apple style |
| Written by kksou | ||||||||||
| Tuesday, 30 September 2008 | ||||||||||
|
The Apple style Accordion Menu is a very neat and cool javascript-based menu provided by www.dynamicdrive.com. In case you're wondering what an "Apple style Accordion Menu" is, just take a look at the Table of Content appearing on the right of this paragraph. Take a look at Demo 1 and Demo 2. You can even include images in the menu. Pretty cool, isn't it? What I've done is to wrap the original code from www.dynamicdrive.com into a Joomla plugin/mambot so that you can easily include the Apple style Accordion Menu in any of your content item. Variations of the MenuYou can now easily change the look and feel of the menu through css. Included in the standard installation of this plugin are two variations:
Other MenusLatest Versionv1.0.10 (for Joomla 1.0) and v1.5.10 (for Joomla 1.5) You can now overwrite the global setting of the menu width locally. See here for details. Unique Features
How to use the "Accordion Menu Apple style" plugin
{Accordion_Menu_Apple_style}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style}
<a href="http://www.site1.com">General</a>
- <a href="url1">Introduction</a>
- <a href="url2">Unique Features</a>
- <a href="url3">How to Use</a>
- <a href="url4">Demo</a>
<a href="http://www.site1.com/links">Links</a>
- <a href="http://www.google.com">Google</a>
- <a href="http://www.yahoo.com">Yahoo</a>
- <a href="http://www.joomla.org/">Joomla</a>
- <a href="http://www.kksou.com/php-gtk2/Joomla/Accordion-Menu-Apple-style.php#demo">Demo</a>
{/Accordion_Menu_Apple_style}
- <a href="url"><img src="img_url" border=0 /></a> - <img src="img_url" border=0 />
{Accordion_Menu_Apple_style 60}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style 60 float:left}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style 60 float:right}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style 60 float:right10}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style}
<a href="http://www.site1.com/links" target=_blank>Links</a>
- <a href="http://www.google.com" target=_blank>Google</a>
- <a href="http://www.yahoo.com" target=_blank>Yahoo</a>
- <a href="http://www.joomla.org/" target=_blank>Joomla</a>
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style}
This is a plain text level 1 menu item
- <a href="http://www.google.com" target=_blank>Google</a>
- <a href="http://www.yahoo.com" target=_blank>Yahoo</a>
- <a href="http://www.joomla.org/" target=_blank>Joomla</a>
{/Accordion_Menu_Apple_style}
Note that this is a global setting that applies to all menus. To set the reveal type as "click" for the current content item (regardless of the setting in the Parameters page), use the following:
{Accordion_Menu_Apple_style 60 float:right revealtype:click}
... menu items ...
{/Accordion_Menu_Apple_style}
To set the reveal type as "mouseover" for the current content item (regardless of the setting in the Parameters page), use the following:
{Accordion_Menu_Apple_style 60 float:right revealtype:mouseover}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style 60 width:200}
... menu items ...
{/Accordion_Menu_Apple_style}
Customizing the menu with CSS
{Accordion_Menu_Apple_style 60 float:right css:your_css_file.css}
... menu items ...
{/Accordion_Menu_Apple_style}
Accordion Menu Apple style moduleIf you wish to include the Apple style Accordion Menu into a module (as oppose to another content item), use the following module which I've written: Accordion Menu Apple style module. Include the Apple style Accordion Menu into another content item => use this plugin. Include the Apple style Accordion Menu into another module => use the Accordion Menu Apple style module. DownloadNote: Due to the recent "warning" from my host that my site's CPU usage is too high, I have to resort to a more primitive method of downloading that does not take up much CPU resource. (The original AJAX version uses too much CPU and mysql resources.) As javascript is used, you have to enable javascript to download the files. Thank you for your understanding. Joomla 1.0.x: AccordionMenuApplestyle_v1.0.10.zipJoomla 1.5.x: AccordionMenuApplestyle_v1.5.10.zip How to install (Joomla 1.0.x)
You are now ready to use this plugin! How to install (Joomla 1.5.x)
You are now ready to use this plugin! Version History
Added one more parameter: Width of Menu This is useful when you want to include graphics in your menu. You can adjust the width of the menu to fit your image. In case you didn't notice it. There's also another parameter Reveal Type. The default is "mouseover". This mean that the submenu automatically reveal when your mouse is over the level 1 menu. If you set the reveal type as "click". Then the user need to click on the level 1 menu to reveal the level 2 menus. You can now easily change the style of the menu (including font style, size, foreground color, background color, etc.) by editing the css file directly. The css file is located in the folder You can set the reveal type as "click" or "mouseover" in the Parameters page in the Plugin Manager. This is the global setting that applies to all. This latest version now allows you to overwrite the global setting in your content item:
{Accordion_Menu_Apple_style 60 float:right revealtype:click}
... menu items ...
{/Accordion_Menu_Apple_style}
{Accordion_Menu_Apple_style 60 float:right revealtype:mouseover}
... menu items ...
{/Accordion_Menu_Apple_style}
Released October 6, 2008 You can now select different css files for different menus with the following syntax:
{Accordion_Menu_Apple_style 60 float:right css:your_css_file.css}
... menu items ...
{/Accordion_Menu_Apple_style}
Note that your css file should be placed in the folder FAQ (Frequently Asked Questions)Q1: I want the link to launch to a new tab or new window when the user clicks on the click. A1: Use the following use the following syntax:
{Accordion_Menu_Apple_style}
[url=http://www.site1.com/links]Links[/url]
- [url=http://www.google.com 1]Google[/url]
- [url=http://www.yahoo.com 1]Yahoo[/url]
- [url=http://www.joomla.org/ 1]Joomla[/url]
{/Accordion_Menu_Apple_style}
Q2: Can I have more than one menu in the same page? A2: By right, you should have only one menu per page. However, go ahead and try it. You can actually put two or menus in the same page. There are two "problems" here, though:
User reviews Average user ratings: 4.5 (from 11 users) Note: You have to be a registered member to leave a comment. Free registration here. |
||||||||||
| < Prev | Next > |
|---|







4.5 (from 11 users)
October 03, 2008 2:11am
Hi again! :-)
really like what you are doing kksou!
One of best/smartest Joomla community devs in my mind. :-)
One question/possible enhancement for this very nice Accordion menu though.
I would like to have more sub menus that can flip out to down-right or down-left vertical as options after you have open the first menu accordion effect(s).
Is this possible?
I know I have not seen this at dynamic drive so maybe this is a tricky one. Hope you understand what I mean.
Also If the accordion sub menus also could be open dynamically with some kind of Ajax effect that would be really really cool!
rgds
October 03, 2008 2:21am
Hi ssnobben,
Thanks for the encouraging notes. But the credit should goes to dynamicdrive.com. They're the one who wrote the original stuff. What I did was only to wrap this into a plugin and module so that one can use this menu easily in Joomla.
If you have seen such a menu somewhere, and the author is providing the tool free for public use like what dynamicdrive.com is doing, let me know and I'll wrap this into a Joomla plugin.
I think I've seen something similar done using mootools or YUI. I'll try to search for it too.
Regards,
/kksou
October 03, 2008 2:23am
Hi
wonder also if it is possible with several sub levels than 2?
rgds
October 03, 2008 11:04am
Hi ssnobben,
As mentioned in the previous post, the core stuff is written by dynamicdrive.com. I only wrap it into a Joomla plugin.
The original code only allows 2 levels. You have all the source codes. As you can see, the file jquery-1.2.2.pack.js is encoded. So it might be difficult to decipher how to make it support multiple levels.
An easier way is to see if you can find another menu that supports multiple levels, and we wrap it into a Joomla plugin.
Regards,
/kksou
October 13, 2008 5:39pm
Hi ssnobben,
You mentioned earlier that:
Have just written a plugin that allows you to add a side bar menu with infinite levels of sub menus. Think this is what you have in mind.
Have submitted to extensions.joomla.org. Might take a few days to get approved.
In the mean time, you can try it first at:
http://www.kksou.com/php-gtk2/Joomla/Side-Bar-Menu-Apple-style.php
There is also a module version at:
http://www.kksou.com/php-gtk2/Joomla/Side-Bar-Menu-Apple-style-module.php
Note that the plugin seems to work with all templates, but the modules doesn't seem to work on some of the templates. I'm still trying to find out why.
Please try it on the default Joomla template first i.e. rhuk_solarflare_ii for Joomla 1.0 and rhuk_milkyway for Joomla 1.5. Make sure it works on your machine with the default template. Then switch to your template and see if it's ok.
Regards,
/kksou
October 16, 2008 6:20am
Hi kksou,
thanks for this nice menu applet, but I have a problem with it. I use the plugin together with the module. The problem is that I have the first field which is a menulink with 2 levels (with about 8 submenu links), then the second field is a 1-level menulink, the third a link with 2 levels again (with about 4 submenu's), but if I move the mouse over the third link, the submenu will not open. Only if I move the mouse to the second link, the third menu link will open up and show the submenu, but I can't click on that third submenu, since if I try to do, the menu will close again.
Do you know what the problem can be? Is there any restriction in which of the menu's can have submenu's? I mean can only the last menulinks have submenu's or only the first or can I just mix everything? I tried to adjust the height, but this doesn't fix my problem.
If this menu works, it's abslolute a very nice menu!
Thanks in advance for any info on this.
Kind regards,
Leon
October 27, 2008 6:55am
Hi, i find this menu great, bur i have a question:
is it possible to make the height of the menu some kind of dynamic? when i have a menu point with 2 subpoints the menu require the same height as if i activate a menupoint with 10 subpoints. is it possible to change that? so that the menu automaticly chooses the height that all subs are shown correctly and so space in the height is "unused"?
hope you understood my problem :)
October 27, 2008 8:46am
okay, i found a solution on my own :)
you just have to change the term:
height: {$menu_height}px;
to
height:auto;
in the css file of the menu! again, great work!
October 29, 2008 4:49am
Hi kksou,
thanks for your excellent support via email! Your advice helped me further with this very nice menu. After I know how the menu behaves my problems are solved! (For anyone who have the same problem as me -> the menu always try to open the sub-level menu if there is one. So this can create a problem when you not carefully think about your menustructure. But knowing this you can work with it and the menu works excellent!)
Also the auto-height suggestion mentioned in above comment works perfect for me!!
This menu AND kksou definitly deserve all 5 stars!
Thanks kssou,
Leon
November 20, 2008 10:13am
1st off, you have done tons of nice coding here! My problem is I can't seem to get the Reveal Type (LocalSetting) to work. I am using the "Glossy_Accordion_Menu" and the code that I have to do a local reveal type override is:
{Glossy_Accordion_Menu revealtype:mouseover} but i am unable to get this to work.
What am I doing wrong? --thanks--
November 20, 2008 11:36am
1st off, you have done tons of nice coding here! My problem is I can't seem to get the Reveal Type (LocalSetting) to work. I am using the "Glossy_Accordion_Menu" and the code that I have to do a local reveal type override is:
{Glossy_Accordion_Menu revealtype:mouseover} but i am unable to get this to work.
What am I doing wrong? --thanks--