Creating Components

There are some basic rules you need to follow when creating components in GoLive. They need to be saved in the correct way, and they need to be placed on the page in the correct way. If you have your own javascript, you must inform GoLive which parts of it contain links to objects within your site.

 

 Saving Components

After you place the pieces you want on a page that will become a component, it must be saved in the correct way. You must not simply save it in the component folder. There is a special icon in the SaveAs dialog box which must be used to select it as a component.

Click on the special icon in the SaveAs window, and select "Component" from the list. It looks like this in GoLive 6. It is similar in earlier versions of GoLive.

  

 

 Placing Components

It is also very important that components are placed into your pages the correct way. Do Not drag them from the site window and drop them onto the page they will be used in. You must drag them from the Site Extras tab of the Object palette.

 

 Custom Javascript

Before you save the component, if you have any custom javascript on the page, you should add something to any links so that GoLive will be able to manage your links properly. If you read any of the GoLive generated javascript, you will see that it has added a special comment in front of any strings containing URLs. It looks like this:

var myval = /*URL*/ "images/mypic1.jpg";
doSomething( /*URL*/ "mypage.html");

By adding the comment:

/*URL*/

in front of a string, this tells GoLive that the string contains a URL of something within the site, and it should manage the link as it moves or places the code. This comment must go in front of the string, and not inside the string. For example, if you did this:

var myval = "/*URL*/ images/mypic1.jpg";

This would not work, since the comment just becomes part of the text within the string.

Note: You do not need to add this to HTML, only to javascript. GoLive already understands which HTML tags have URLs in them and deals with them. But it doesn't know what you intended to do with the javascript that you create (or cut and paste from some javascript site).

 

These tutorials were written by Dave Jones (aka "daverj"), and are provided free to the Adobe GoLive user community, but are presented without further support or guarantees. Please check the Adobe GoLive User to User Forums for any further assistance.

GoLive is a registered trademark of Adobe Systems Incorporated
GoLive Tutor is not affiliated with, or endorsed by Adobe Systems Incorporated
Some images © 2002 www.ArtToday.com   All others © 2004 David R. Jones.   All rights reserved.