big bang Power tools for Adobe GoLive
MenuMachine Manual

 

 
Using a menu in a GoLive Template

Using a MenuMachine menu in a GoLive Template is a good way to be able to update your menu and have the changes appear automatically on all the pages that were created from the Template.

However you should not put anything that you may want to change later, including a menu, in a Template Editable Region.

You can even put a Menu in a Component and then place the Component in a Template. Why would you do this? Read this page and the Component page before you decide.

What are Templates, Components and Stationery pages?

If you are new to GoLive Templates, Components and Stationery, here is a brief description to help you decide what sort of 'master' page you need to make to help you create multiple pages based on that page.

These three GoLive 'master' pages are normal HTML pages which must be saved into the yoursitename.data folder(GL6.x) or web-data folder(GLCS) > Templates, Components or Stationery folder. (See here for the file/folder structure). Once they are saved into one of these folders, GoLive recognizes them as part of your site and then allow you to use these files in special ways depending on which folder you saved the file into.

GoLive Stationery

GoLive Stationery pages do not update pages created from them. They simply allow you to set up a master page, from which other pages can be created. Any changes made to the master will not be applied to pages already created from it.

As Stationery pages are simply normal pages that are saved into a special location so GoLive can use them, we will not discuss them here. Just follow the normal instructions for MenuMachine if you are placing a menu on a Stationery page. Read this note about link handling if you do decide to use Stationery.

GoLive Components and Templates

GoLive Components and Templates are more powerful than Stationery pages as they have the ability to automatically update all pages linked to them or created from them.

A Component is placed into another page – it acts like a 'snippet' of code rather than a whole page. You don't create pages from it as you do with Stationery or Template pages. If a Component page is edited, the whole Component code segment in the pages the Component was placed into will be updated but the rest of the page is untouched.

Templates are whole pages which have Editable Regions. These are areas of the Template page that you select and name. Once you set an editable region, a page created from the Template can be edited in that area only. All other areas are called Locked Regions.

Templates are great if you have mostly the same elements on many pages, but need to change a few elements e.g. a headline, some text, some images, but the rest of the page elements are always the same. The unchanging elements might include a MenuMachine menu which is the navigation system.

You will see tags in the code indicating the editable regions which look like this:

<!-- #BeginEditable "textarea" -->
<p>editable text area of the page</p>
<!-- #EndEditable -->

It is highly recommended NOT to change anything in source mode unless it is between these tags as the changes can be overwritten the next time you update the Template!

In Layout view, the editable area is unshaded and you can change everything inside these areas.
These editable areas will NOT be updated if the Template is updated, but all other information in the 'locked' or shaded regions of the page will be updated.

Below is a picture of a page that has been created from a Template page. Note the purple shading indicating non-editable areas. These are the inverse of the green Template Region areas you see if you open the actual Template page.

If you want to turn off the shading as you are working, use the Window > Highlight palette > Colors button and slide the Locked Regions slider to the left.

So what sort of page do I put my Menu on?

You can put a menu on any of these types of pages.

Read your GoLive manual for full instructions on using GoLive Templates, Components and Stationery. We can only outline the information applicable to MenuMachine here.

Once you are familiar with the three types of pages, it is now up to you to decide what sort of 'master' files to create so you easily create pages based on that 'master'.

If you need changes to be applied globally/site-wide later, then don't use Stationery. Use a Template or Component instead.

Using a Menu in a Template

You can place a MenuMachine menu directly in a GoLive Template page.

If you need to update the menu later, do you want those changes to apply to all pages that are linked to the Template?

If so, DO NOT place the menu in an Editable Region of the Template. If you do this, all pages that are created from the Template will receive the version of the menu that is current at the time the new page is created.

If changes are made to the Template later, pages that are already linked to the Template will not update the menu if it's placeholder () is in an Editable Region. Only Locked regions of Template pages are globally updated.

Here are some basic instructions to set up a Template:


1) Open your .site file in GoLive.


2) Make or save a new page in the site.


3) Edit this 'master' page to look like you want the pages of your site to look.


4) Place a menu on the page. Make the MenuMachine floating box
placeholder () is the last object on the page.
Use Special menu > MenuMachine > Fix Code Location if in doubt. Edit and position the menu as described in previous sections


5) Save the page. Make sure the GeneratedItems folder contains the menumachine.js and spacer.gif files so your menu will function correctly.


6) Now you are going to move or save this file so it can be designated as a Template for GoLive to access. DO NOT do this outside of your site window as the links will be wrong.

Make a copy of the page in the site window and drag the new file into the Site Window > Right pane > Extras Tab > Template folder.

OR

6) Do a Save As of the open page and locate the yoursitename.data > Template folder (GL6.x) or web-data > Templates folder (GLCS) inside the folder which contains the.site file. Save the file into the Templates folder. This is outside your root folder so take special care to save into the correct folder. Click in the Site Window > Right pane and use the Refresh View button in the GoLive toolbar to update the window. Ensure you can see your file saved into the correct folder in the site window as pictured in step 8).

Look at the images below to see the folders that you need to save your special 'master' pages into. Note that these folders are OUTSIDE your root directory but you can see them in your site window when the site is open in GoLive.

GoLive CS:
GoLive 6.x:
   



7) Once the Template page is saved into the correct location, GoLive will recognize the page type and allow you to apply Editable Regions to the page. Ensure you don't put the MenuMachine floating box placeholder () inside an editable region otherwise changes won't be applied later.

Look at the image below. This is a Template page with a Component placed on it. The Component placeholder is at the base of the page and it contains the MenuMachine menu that is seen at the top of the page. The Component is NOT in one of the green shaded Editable Regions as it needs to be changed if there are any later edits to the Component or Template.



8) Once the page is set up correctly (see the image below – your site should have a page in the Templates folder as shown), you can drag the Template page from the Site Window > Right pane > Extras Tab > Templates folder to the left pane of the site window.

Note: If you can't see these files in the right pane as shown below, check that you have saved the pages into the correct folders as indicated in step 6) above and you have used the Refresh View button when the right pane is selected.

When you drag the template page across, you will be asked whether you want to Move the Template or Create a new file from it. You want to Create a new page so select this button.



Alternatively, you can drag the file from a palette:

GoLive CS:
GoLive 6.x:

Go to the Window > Library > Templates button > your.site folder.

Drag the correct icon into the left pane of the site window where your other web pages are located.
   
Go to Window > Objects and select the Site Extras button.

Choose Templates from the drop-down list in the bottom right. You will see your component page/s as icons.
Drag the correct icon into the left pane of the site window where your other web pages are located.

9) If you need to edit the Template page, double-click on it in the Site Window > Right pane > Extras Tab > Template folder and you will be asked if you would like to Modify or Create a file. This time you choose Modify.



10) When you change the page and Save, you will be presented with a hierarchical list of files that will be modified automatically. Normally you would leave them all ticked but you may change the selection if you need to. Remember, only the Locked Regions will receive changes – Editable Regions retain the final page's information and don't change.

Using a Menu in a Component

You can place a MenuMachine menu directly in a GoLive Component page.

See the 'Menu in a Component' instructions here.

Using a Menu in a Component in a Template

Placing a menu in Component, then putting that Component in a Template is perfectly acceptable, as long as you follow these instructions for placing a menu into a Component and placing the Component into a page. A Template is just a normal page saved into a special location so the same rules apply.

Note: Due to a small glitch in GoLive CS link handling, you must save the Template page into your site BEFORE you place the Component into the Template.

In some ways, placing a Component into a Template is superior method to using a Template on its own.

To illustrate an example – just say you have a site with various Templates for different page layouts. If the menu is the same on all these pages, and only the location of the menu changes, you set up ONE menu Component page, placing that same Component on each Template.

By using the 'Lock to image' positioning technique, and changing the position of the 'lock to' image on each Template, the menu can be positioned in a different place on each Template.

Then, when you need to edit the menu in the future, you can make the changes to just ONE Component, but all the Templates and therefore pages made from them are updated automatically!

Just ensure the 'locked' image is in a Locked Region in the Template so global updates are made to all the 'created from' pages.

A Note about links in Components, Templates and Stationery

When you open a Component, Template or Stationery page, remember that you are accessing a page which is OUTSIDE the root folder (or should be if your site structure is correct).

Because the page is outside the root directory, when you put an image on the page, or make a link to another page either inside your menu or not, the link will look a bit strange. It will start with "../../Yoursitename/etc".

For example, a Component page has a path like this:
/site_folder/web-data/Components/component_page.html

It has to look back up to the site_folder and then go down through it to find the image or link inside the site.

Don't panic and don't change the links manually. GoLive is managing the links correctly. If you manually edit the link, or change anything OUTSIDE of GoLive, the links will fail.

When you create a file from a Template page, or place a Component onto a page, the GoLive .site file manages the links properly and you will notice that the links on the new page (which is saved inside the root directory) are correct.

BUT, due to a bug in GoLive Stationery link handling, your links may not be corrected in this way if you create a file from a Stationery page. You have to open each page that is created from Stationery, make a slight change (like add some text then delete it), then save the page to get the links to update properly. Otherwise you may be left with the link from the Stationery folder which will be wrong. Remember, edits to a Stationery page are not propagated to pages already created from it. You may as well just have a 'master' page in your root folder that you duplicate. It has the same effect but the links will be correct!

Special Note for GoLive CS – Using a Component in a Template

There is a problem in GoLive 7 that occurs when Components are placed directly in Templates. Basically, GoLive is neglecting to notify extensions about the link change when the Template file is saved, which means the links are not updated correctly. This only happens if you place the Component in a new Template, before saving the Template itself.

You can work around it by ensuring that you save the Template page *before* placing the Component in it. This will allow MenuMachine to build the correct links initially instead of using the temporary file:// links. This works successfully to maintain link integrity.

Stripping Code on upload

The following note applies to sites that utilize GoLive's special features including GoLive Templates, Components and Stationery.

If you like to strip GoLive code from your pages when you upload to your server, make sure you have a full copy of the complete GoLive site (meaning full site structure with support folders e.g. yoursitename.data folder(GL6.x) or web-data folder(GLCS) etc.) saved so you can edit your Templates and Components later. If you download the pages from the server after code has been stripped, GoLive no longer recognizes the various 'master' pages and global changes can no longer be made in the same way.

This Section

Menu in a Template

Menu in a Component

"Lock to image position"
menu in a Component

Multiple Components

Multiple Menus & Layers

GoLive Actions & Menus

Horiz Menu with Actions

Text Wrap in a Menu

<< back to contents

Troubleshooting & FAQs

Search documentation:
next page >

© Big Bang Software Pty Ltd 2004  

bb