====== Using the Spry Menu Widget for Navigation ====== ===== Overview ===== NOTE: This article is intended for people with knowledge of HTML and CSS (no knowledge of JavaScript is required). Early Impact does not provide technical support on implementing Spry Menu Bars into your store design, beyond the documentation included in this and related articles. ProductCart v4 allows you to create category and content page navigation that is ready to leverage some AdobeĀ® Spry widgets that are included in ProductCart. When you generate a category or content page navigation menu that is ready for use with Spry, ProductCart will create an ordered list that contains the links for your navigation menu, and identifiers that are used to style it and make it behave the way you wish. The cascading style sheets and the JavaScript files that will style the menu and make it work, however, are not automatically added to your storefront. That's discussed in the following section. ===== Preparing header.asp ===== You only need to make a couple of small changes to //header.asp// to prepare the page for the navigation menu created in the Control Panel. Do the following: * Download header.asp from the pc folder using your favorite FTP program * Make a backup copy * Open it in Notepad or your favorite HTML editor * Follow the instructions in one of the following two sections depending on which kind of menu you wish to use ==== Horizontal Menu ==== Locate the following code: Replace it with: ==== Vertical Menu ==== Locate the following code: Replace it with: ==== Both Vertical & Horizontal Menus ==== As you can tell, the JavaScript file remains the same. Only the CSS document changes between the two menus. So if you wanted to have both a horizontal and a vertical menu on the same page, you would have: ==== Multiple menus of the same kind ==== If you need to display multiple menus of the same kind (e.g. more than one vertical menu), and you are OK with them sharing the same display settings (i.e. same colors, fonts, etc.), then there is nothing else you need to do in //header.asp//. You will simply need to initialize them separately as explained below. However, if you want multiple menus of the same kind (e.g. two vertical menus, for categories and content pages), but you want them to look different, see the section at the bottom of this document for instructions on how to handle that scenario. ===== Preparing footer.asp ===== ==== Initializing the menu ==== Next, you will need to place a small piece of code in your footer.asp file as well. Locate the code: Just before it place the following code: ... where **menubar99** is the ID of your menu bar. Please note that it appears in 2 places in the code above. See below for details on the Menu Bar ID. If the ID of the menu bar and the one used in the code above do not match, the navigation will be shown, but it will not work (nothing will happen when you mouse over the top-level menus). ==== About the menu bar ID ==== The ID of the menu bar (//menubar99// above) must match the ID that you have assigned to your navigation menu when you created it. When you do so in the Control Panel, ProductCart will create an unordered list that uses that ID. For example, the first line of the unordered list created by ProductCart for a vertical menu bar would like this: