Home » Item #698
Is there any way to make the product categories menu expand/contract? I'd like to make only the master categories visable on the home page and if clicked on the menu dynamically opens - in the same way it works on CactuShop.com.
Menu's like that on CactuShop.com use simple javascript to do expanding and contracting menus.
The problem with doing this on your Categories menu is that the categories menu is built up dynamically from the database.
So you've got two options. The easiest way is to make the category menu static - i.e. it is hard-coded in to the HTML template instead of dynamically created in the buildpage with the xxxCATEGORYMENUxxx tag. Simply remove this tag and put in the javascript and HTML for your category, linking though to the same pages as before. It is beyond the scope of this knowledgebase article to go over the javascript code, but you can easily find free examples on the net of different types of menus.
The disadvantage of this is that obviously if you change your category menu around frequently, you'll also have to update your template every time. Alternatively, you could try and change the code in the buildpage that builds up the HTML dynamically. This will require some ASP knowledge as well as the javascript required.