Class Summary HTML_MenuBrowser
Вернуться к: HTML_Menu
Class Summary HTML_MenuBrowser
Together with menu (3) and the (userland) cache you can use this browser to generate simple fusebox like applications / content systems.
Let the menubrowser scan your document root and generate a menu (3) structure hash which maps the directory structure, pass it to menu's setMethod() and optionally wrap the cache around all this to save script runs. If you do so, it looks like this:
// document root directory define('DOC_ROOT', '/home/server/www.example.com/');
// instantiate the menubrowser $browser = new menubrowser(DOC_ROOT);
// instantiate menu (3) $menu = new menu($browser->getMenu());
// output the sitemap $menu->show('sitemap');
Now, use e.g. simple XML files to store your content and additional menu informations (title!). Subclass exploreFile() depending on your file format.
Class Trees for HTML_MenuBrowser
-
HTML_MenuBrowser
Вернуться к: HTML_Menu