Recommend this page to a friend! |
Download .zip |
Info | View files (16) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2006-06-06 (10 years ago) | 38% | Total: 1,891 This week: 1 | All time: 2,022 This week: 1,047 |
Version | License | Categories | ||||
xmltohtmlmenu 1.0 | Free for non-comm... | HTML, XML, PHP 5 |
Description | Author | ||||||||||||||
This package can be used to generate menus in XML and HTML. |
|
XMLMENU [PHP5] DOMDocument and XSLTProcessor enabled are best, but not mandatory. Called this way : $menu = xmlmenu::getInstance (optional (string) sVersion, optional (string) sEncoding); see index.php for more information, and comments in classes. DESCRIPTION This package is meant to : - generate an XML menu - generate an HTML menu using the generated XML xmlmenu::getInstance () determines which extensions are or are not enabled, and instanciates the correct class. First step : - generate the XML. Can be done with the class, or manually (the xml files are stored in 'xml/'. They look like : <menu><node>text1<node>text1_2</node></node><node>text2</node></menu> 3 methods : xmlmenu::defineNode () to define a new node xmlmenu::defineAttributes () to define attributes for a given node (can be done directly with xmlmenu::defineNode()) xmlmenu::defineLink () to define the href link of the node Notice : the node are attributed an id via xml:id. - see the generated xml via echo $menu (xmlmenu::__toString() method) - save the xml file if needed via xmlmenu::xmlToFile() - load an xml from a file via xmlmenu::fileToXml() - apply an XSL to the menu to generate an HTML menu via xmlmenu::toHTML() The xsl needs to be created first, of course. I have created 2, they are stored in 'xsl/'. - save an html menu via xmlmenu::htmlToFile() |
Files | / | class |
File | Role | Description |
---|---|---|
abstractxmlmenu.cls.php | Class | abstract xml menu class |
xmlmenu.cls.php | Class | xmlmenu factory class |
xmlmenuhasboth.cls.php | Class | xmlmenu class when DOMDocument and XSLTProcessor are enabled |
xmlmenuhasdom.cls.php | Class | xml menu class when only DOMDocument is enabled |
xmlmenuhasnone.cls.php | Class | xml menu class when no extension are enabled |
Files | / | html |
File | Role | Description |
---|---|---|
menu1.html | Output | html menu example |
menu2.html | Output | html menu example |
menu3.html | Output | html menu example |
Files | / | xml |
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.