
MenuMachine 1 only
GoLive 6, CS, CS2
Mac, Windows
Article ID: 000027
Category: General Issues
I want to use MenuMachine 1 or pages containing a menu in another editor such as Dreamweaver, Contribute or FrontPage.
MenuMachine 1 is a GoLive extension but the pages containing a menu can be taken into another editor.
That is, the page will still work but the menu can't be edited.
MenuMachine 1 is a plugin for GoLive and only operates within the GoLive application. Menus generated with MenuMachine 1 will work if the HTML page is taken into another editor such as Dreamweaver or Contribute, but there will be no editing interface.
We strongly recommend that you do not tamper with the MenuMachine 1 source code as it has a strict syntax and will break if the slightest error is introduced.
As MenuMachine 1 menus are designed to be edited within GoLive, we can not support them once they have been edited in another program. However, if you have a thorough understanding of MenuMachine's features, and the importance of the links to the menu support files, you should be able to adapt your menu to be used (but not edited) in another program.
NOTE: Menus may look wrong in another editing program but should look correct when viewed in a browser if you have managed the menu code correctly.
Guidelines for using a MenuMachine menu in another program:
1. Always a keep a version of the menu in its native GoLive format so you can edit it later.
Because you can't edit the menu in another program, it is wise to keep a version of the menu on a blank page in the normal GoLive format. This will be your master menu which can still be fully edited using the MenuMachine Inspector.
If you need to change the menu, you can do so and then copy and paste the new code into the other page/s replacing the old menu code.
Remember that the positioning of the menu - whether you have manually moved the menu's floating box/layer, used "lock to image position", or used one of the relative positioning options - will be determined by the code, not the position of the code. The code must be placed in the appropriate sections, and the part of the code must be placed at the end of the page as explained in step 2. below. If the menu sits in the wrong position, you must edit its position in the GoLive version of the page.
2. Be able to identify the menu code.
You need to be able to identify the parts of the menu code which need to be copied and pasted into other pages after you have edited the menu in GoLive.
There are two parts of menu code which need to be copied. There is a section in the <head> area and a section in the <body> area.
Both should be fairly recognizable.
In the <head> section look for:
<bb:menulib c="0">
<script type="text/javascript" xsrc="http://www.mysite.com/GeneratedItems/menumachine.js"></script>
</bb:menulib>
In the <body> section look for the code inside these tags:
<div id="bbML" style="...">
<bb:menu height="30" width="300" i="1" v="1.5">
<script type="text/javascript">
<!--code describing your menu is in here//-->
</script>
</bb:menu></div>
Both sections of code need to be present in the page with the body section as the last code just before the final tag.
You will need to pay special attention to the links to the following menu support files which can be identified in the menu code:
menumachine.js (link will be in section)
spacer.gif (link will be in section)
These files will only present if you are using arrows for submenus:
menutriangle.gif (link will be in section)
menutriangledown.gif (link will be in section)
menutriangleleft.gif (link will be in section)
3. Understand link management and why you need to use absolute links.
Golive maintains relative links for you, including the links in your menu. This means that when you move pages into or out of folders in your GoLive site window, the relative links in your pages are automatically corrected to reflect the new locations.
To ensure that your links will remain correct once you begin editing or moving pages in another program, you should make all your menu links absolute.
Absolute links can be either:
root-relative (e.g. /pages/mypage.html); or
fully-qualified (e.g. http://www.domain.com/pages/mypage.html)
E.g. if you want a menu item to link to your 'about' page, you would type the link for a particular menu item into the Menu Link field in the MenuMachine Inspector as:
http://www.yoursitename.com/pages/about.html (fully-qualified)
OR
/pages/about.html (root-relative, which is NOT the same as relative where you would see "../" in the link. This link goes to the root of the site, then to a folder called 'pages' and then to the file 'about.html')
All the links you type into the MenuMachine Inspector need to be absolute. This includes the links to the images and rollover images you may be using in the menu items.
All the links you enter should represent the uploaded location of the files they are linking to.
The reason for doing this is so that no matter where in your page is located in your site structure, the links on that page will always work. That is not the case for a relative link. If you use relative links, you will have to correct them each time you move a page in or out of a folder or move one of the linked files.
4. Make the links to the menu support files absolute.
There are some other files which also need to be absolute but you can't edit these links in the MenuMachine Inspector. These are the links to the menu support files as seen in point 2. above:
menumachine.js
spacer.gif
menutriangle.gif
menutriangledown.gif
menutriangleleft.gif
You can either go to source view and edit them manually, or have GoLive change them for you.
Manual editing of the support file links:
If you are finished editing the menu, switch to Source view and locate and change the links to the support files manually. You MUST save in Source view or GoLive will manage the links back! If you switch back to Layout view to do some more editing, remember to switch back to Source to check the links and save.
Automatic editing of the support file links:
Locate the file called pathsettings.xml in your GoLive folder.
GoLive > Modules > Extend Scripts > MenuMachine > pathsettings.xml
This file tells MenuMachine where to look for the support files. You can edit this file to tell MenuMachine to look in a different location for the files so that you do not have to switch to Source view to save the pages.
All you need to do is replace the words "automatic" in the pathsettings.xml
file with the final location of the menu support files where indicated. Then you have to upload those support files to the place you told MenuMachine to find them.
Then you need to open up the menu page in GoLive and make a change to the page so that MenuMachine reparses the page and writes the new links as set in the pathsetting.xml file. Save the page in Layout view. Then check the page in Source view to make sure it has done it.
e.g.
http://www.mywebsite.com/GeneratedItems/menumachine.js
http://www.mywebsite.com/GeneratedItems/spacer.gif
http://www.mywebsite.com/GeneratedItems/menutriangle.gif
http://www.mywebsite.com/GeneratedItems/menutriangledown.gif
http://www.mywebsite.com/GeneratedItems/menutriangleleft.gif
This will affect ALL menu pages you open in you open in GoLive, not just this page or this site. Keep an original version of the file elsewhere on your drive for normal use with other sites.
5. Upload the support files to the correct location.
Whether you have manually changed the links to the support files or used the 'pathsettings.xml' file to automatically manage them, those support files need to be uploaded to the location you have indicated.
If the menu isn't visible in the browser, or you see a 'bbMenu: is undefined' error in the browser, check the links to the support files are valid and the support files are uploaded to the right location.
6. Optional: Use the menu in a Server-side include.
This is an advanced topic and we do not recommend you use this technique unless you are familiar with using include files and you know the configuration of the web server you are using.
Using the menu in a Server-side include will allow you to create one file which contains the menu code. You can insert a reference to this menu file on each page that uses the menu. If you need to edit the menu, just edit the original GoLive page, then save a cut-down version as an include file.
See Article 000060 for instructions to set up a menu include file.
For information about your web server setup, consult your ISP.
Last updated: July 29, 2006
This article has been viewed 12846 times.