Command: Compile Menu

Top  Previous  Next

Compiles the .awm file into a .js file that has to be linked to your web pages.

 

To use a menu in your web pages you must take the following four steps:

Step 1. Compile the menu     (note: spaces are not allowed in filename)

Step 2. Link the compiled menu to your web pages using the related AllWebMenus command

Step 3. Upload the necessary menu files and folders (see a description of these elements below)

Step 4. Upload the web pages that contain the menu link

(note: steps 2 & 4 are not necessary if you have already linked the menu to your web pages and you only want to update your menu. They may be necessary if you are using a new AllWebMenus version with improved menu-linking code)

 

 

How it works:

 


When compiling a menu as menu.js, the following elements are created inside the same directory:

 

1. The core menu.js Javascript file.

 

2. The awmdata directory (or your custom directory as defined in Project Properties > Compile Properties > Folders > Advanced).

This directory contains the necessary Javascript menu-building Libraries (awmlibX.js) along with any images used by the compiled menu.

 

The awmdata directory (and its contents) is required and must always reside in the same directory with the menu.js file.

Therefore, it is critical that you do not forget to upload the awmdata directory along with the menu.js file!

 

 

Example

Let's say that the local root folder of your site is the c:\mysite folder and that the contents of your web site are:

| -------------------------------------------- |

| c:\mysite\index.html               |

| c:\mysite\companyinfo.html     |

|          ...                                 |

| c:\mysite\faq.html                   |

| ---------------------------------------------|

 

You now design a menu in AllWebMenus, called mysitemenu.awm, and you compile it into a file called c:\mysite\mymenu.js.

 

Your local web site now contains:

| ------------------------------------------------------------------ |

| c:\mysite\index.html                                        |

| c:\mysite\companyinfo.html                            |

|         ...                                                      |

| c:\mysite\faq.html                                            |

| c:\mysite\mymenu.js                                |

| c:\mysite\awmdata\awmlibX.js                   |

| c:\mysite\awmdata\dot.gif                           |

| c:\mysite\awmdata\image1.gif                    |

|         ...                                                         |

| c:\mysite\awmdata\image8.jpg                   |

| ------------------------------------------------------------------ |

 

The elements in bold should be uploaded on the server in the same directory structure where they are locally created.

 

If you don't upload them or you misplace them on the server, the menu will produce a run-time error and will fail to appear due to the following reasons:

misplacement of the mymenu.js file: all web pages linked to the compiled menu will not be able to find it.
misplacement of the awmdata directory: the  mymenu.js file will not be able to call the necessary  awmdata\*.js javascript libraries that build the menu.

 

 

Notes:

 

The "mymenu" name was chosen as an example. If you name the compiled menu "menu1", then you should find and upload a menu1.js file and an awmdata folder.

 

You can compile the menu anywhere you like within your site's directory structure. This decision should not be affected by the location of the pages you want to link the menu to.

For example, if you want to link the menu into a Dreamweaver template, you are not required to compile the menu into the Templates directory, as you will have to upload the Templates directory on the server too.

In general, simply compile your menu into your root directory or into a manually-created subdirectory and you will be able to link it to any page, shared border, template or library of your web site directory structure.

 

Notes for FrontPage users:

1. To properly use AllWebMenus with Shared Borders please read carefully the "Compile Properties, FrontPage Support" section.

 

2. The menu should not be compiled inside the  _borders folder or any other special folders used by the authoring tool to manipulate common objects. The obvious reason is that these folders are not uploaded on the server when publishing the site. Instead, compile the menu in root or in any other manually-created subdirectory.

 

 

See also

Link Compiled Menu to Web Page(s)

Compile Properties: Folders

Compile Properties: Cross-Frame Support

Compile Properties: Optimization

Compile Properties: FrontPage Support

How Do I Use my designed menu on my web pages

 

 

 



DHTML menu builder
Command: Compile Menu
Javascript menu software
Compile Menu,Re-compile a menu compiled with version 1.3.358 or below
Drop-down menu maker