Dynamenu for osCommerce v 1.00 (05/07/06) osCommerce Contribution by Nathan Welch - http://www.natewelch.com WHAT IS IT? This contribution provides a variety of dynamic menu styles for the category listing on your osCommerce website. You can now display categories as a horizontal drop-down menu, a vertical fly-out menu, a collapsible tree menu, or plain horizontal and vertical menus. Most menu types do use Javascript to make them "dynamic" but fall back nicely to non-JS enabled browsers as the elements are all rendered in HTML and CSS (making them better indexed by search engines than all-JS solutions). It supports a wide range of browsers: Mozilla, Konqueror, Netscape, Safari, Opera, Internet Explorer; rather old browser versions are supported, too; accessibility is provided for text-only browsers. By changing some simple configuration options and tweaking the included CSS, you can have a great dynamic solution for your osCommerce website. A demo of the menu types can be seen at my website: http://www.natewelch.com If you find this contribution useful, won't you please make a small donation at my website, http://www.natewelch.com ? Any amount is appreciated ;) SPECIAL THANKS DynaMenu for osCommerce uses the library files of the PHP Layers Menu (v 3.20) developed by Marco Pratesi and is being redistributed as part of this block under the provisions of the GNU Lesser General Public License (LGPL). Thanks to the developer of the PHPLM for providing a wonderful set of core files. See http://phplayersmenu.sourceforge.net/ for more information on PHPLM INSTALLATION To install DynaMenu for osCommerce, upload the files in the /catalog directory to the corresponding directories of your osCommerce site. The /images directory includes images used in rendering the various menu styles (transparent.png required for all menu types, arrows for dhtml menus and tree graphics for tree menus). The /includes/boxes and /includes/functions/dynamenu directory includes the "box" that outputs the menu and various support libraries, respectively. Once you've uploaded the files, you'll need to display the menu somewhere in your layout by including the file in either the left or right column of your site (includes/column_left.php, includes/column_right.php) or even embed it right in the header or footer of your website (includes/header.php, includes/footer.php). Just add the following PHP code: include(DIR_WS_BOXES . 'dm_categories.php'); If you're placing the box within the HTML of your layout (a horizontal drop-down in the header or footer, for example), don't forget to surround that code with PHP tags! Include the sample style of the menu type you intend to use from dynamenu_for_osc_styles.txt in the stylesheet.css of your osCommerce site (or include them all if experimenting!) Lastly (and this is IMPORTANT), if you plan to use either the horizontal drop-down or vertical fly-out menu styles, you must echo (output) a special variable in the *footer* of your osCommerce site. Open the includes/footer.php file and in the last line (before the closing "?>" PHP tag), insert the following: // Output the footer for Dynamenu for osCommerce echo $GLOBALS['dmfooter']; This outputs the hidden submenus used by those menu types. It is important to output this as the last thing in your layout (after all other output) to ensure proper rendering of submenus. CONFIGURATION At the top of the dm_categories.php, you will find several configuration options, including: the type of menu you wish to use, whether to show the menu in a traditional box, icon/image settings, and more. Open this file and review the options available to you, setting them to best match your desired results. The look of the menu can of course be altered by updating the styles you've included in your catalog's stylesheet. Some options (which are marked) should not be altered, as they related to positioning, etc... and may cause your menu to not work properly. There are also templates some menu types use (in includes/functions/dynamenu/templates), but for the most part you should be able to achieve the desired result by tweaking the stylesheet. Again, if you find this contribution useful, won't you please make a small donation at my website, http://www.natewelch.com ? Any amount is appreciated ;)