Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DHTML menu ... nice and easy


belladonna

Recommended Posts

I have received many requests by mail for the dropdown menu as found on http://www.tennisspeciaal.nl/

Below an explanation on how to incorporate the menu.

 

The code for the menu was taken from BrainJar.com. Due to the terms of use, I cannot publish the code on other sites, thus please visit

http://www.brainjar.com/dhtml/menubar/

... and read the tutorial on how to use and customize the menu. Any accompanying documentation is a violation as well, but I don't think this small explanation falls into that category. ;)

 

For ease of use, it is advisable you use an external javascript file. I have called mine "menu.js" and saved the file in the directory "catalog/".

 

Simply paste

 

<script language="javascript" src="menu.js"></script>

 

... in all your main files residing in the directory "catalog/" right before the style sheet reference.

 

NB: if you already use an js-file in all your documents, then cut and paste the code into that file to save time.

 

Define the navigation file in "application_top.php" residing in "catalog/includes/"

 

define('FILENAME_NAVIGATION', 'nav.php');

 

In the same directory you will find "header.php". Include the following code right before your main table:

 

<?php include (DIR_WS_LANGUAGES . $language . '/' . FILENAME_NAVIGATION); ?>

 

Finally you will have make the navigation file (nav.php) which contains the menus and submenus. How to build these is explained on BrainJar.com (the part with all the div-tags). Simply save all menu definitions in "nav.php" and make sure it resides in your languages directory, e.g. for english "catalog/includes/languages/english/".

 

Note that you can have different dropdown menus for different languages. These you define in "nav.php".

 

If you have any questions, you can send me an e-mail or pm.

 

Take care,

Richard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...