Recommend this page to a friend! |
Download .zip |
Info | Screenshots | View files (13) | Download .zip | Reputation | Support forum (5) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2005-09-01 (11 years ago) | 74% | Total: 4,247 | All time: 675 This week: 1,113 |
Version | License | PHP version | Categories | |||
xpandmenu 1.0 | BSD License | 3 | HTML |
Description | Author | |||||||||||||
This class can create multi-level hierarchical menus based on a list of menu items and submenu items using DHTML. |
|
+-----------------------------+ | xPandMenu MULTI-LEVEL class | +-----------------------------+ | Patrick Brosset | | patrickbrosset@gmail.com | +-----------------------------+ | 02/2005 | +-----------------------------+ General ------- The xPandMenu PHP class can help you create complex menus for your webpages. Items organised in the menu are displayed in a TreeView structure which resembles the MS Windows OS's directory explorer. The usage principle is simple: You first create a root object which will be the `base` of your menu. You then append `child` nodes to this root and `child` nodes to these nodes as well. The menu can have as many sub-levels as needed. Example ------- This example shows how you can organise your items on your website using this PHP class. + Home page + About me + my CV + contact details + email + phone + Photos + Travels + Parties + my birthday + ski trip + Friends + News + PHP Classes + XpandMenu class available on PHPClasses.org Benefits -------- + Each item in your list that contains sub-items can be collapsed / expanded by clicking on it. + Each item in your list can be given a 2-states image that will be displayed next to the item and be swapped wheter the node is open or closed + The entire menu-look can be highly changed through CSS + The HTML code generated for the menu is only made of <UL></UL> lists + The state of the menu can be saved from page to page + The generated code may be saved once and for all for future use Requirements ------------ The menu's collapse/expand facility is done with Javascript. The client must have javascript turned-on to use the menu. The class was developed using PHP v 4.0.1 Hoe to use the class? --------------------- Please have a look through these 4 example files as they currently represent the only documentation available. I'll try to document the class itself soon. > example_simple.php Simple and basic example on how to use the main functions of the class You should be able to get started with this, although it is recommended to have a look at the other examples as well in order to use more interesting features > example_complex.php Still simple example on how to build a menu, but the menu is a lot more complex this time and includes several sub-levels > example_SaveState.php This example builds the same menu as the previous example file but lets you save the state of your menu: When a user goes to another page which also displays the menu, you might want to display the menu as it was when the user left the previous page, that is, with expanded or collapsed nodes as they were. In this example, you learn how to simply call 2 Javascript functions that will save the state of the menu inside a cookie and then restore it from that same cookie. Warming: the user must allow cookies on his browser to ba able to use this feature. > example_reuseHTML.php In this example you also build the same complex tree but you are taught how to save the generated code in a file! Why? In some cases, your menu might not need to be dynimically generated every time, for instance if the menu is used to display links to your website's pages, these links might never change at all. The example helps you build a page that will: - generate the menu if it had not been generated before - save the generated code inside a file - and restore the menu from that file if it is found |
Screenshots | ||
Files |
File | Role | Description |
---|---|---|
document_win.gif | Icon | Windows-style document icon |
example_complex.php | Example | Complex usage example |
example_dynamic.php | Example | Example file to learn how to create a menu dynamically from a multiple array of links |
example_reuseHTML.php | Example | Learn how to save the generated code to reuse it later |
example_SaveState.php | Example | Learn how to save the state of your menu in order to re-display it as is on another page |
example_simple.php | Example | Simple usage example |
File.php | Class | A simple file loader / writer used by the xPandMenu class to save the generated code |
folder_win.gif | Icon | Windows-style closed directory icon |
folder_win_o.gif | Icon | Windows-style open directory icon |
readme.txt | Doc. | READ ME FIRST |
xPandMenu.css | Data | CSS file to stylize the menu |
xPandMenu.js | Data | External javascript file for dynamic actions |
xPandMenu.php | Class | PHP class file |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.