Using componentsYou use GoLive components in your pages to reference one or more elements stored in a single source file. Components are useful for buttons, logos, headers, mastheads, or other common navigation elements that you want to use throughout your site. Changes you make to elements in a component's source file are updated dynamically in the pages that use the component. When you add a component to a page, the component remains linked to its source file until you detach it. You can double-click components on the page to open their source files and edit the files. Note: Components cannot contain objects from the Head set in the Objects palette. Also, you should make sure to use the same character encoding for a component's source file as the character encoding in the pages that use the component. (See Adding elements or scripts to the head section.) To create a component source file:
This ensures that the component can be easily edited in the Layout Editor. Also, the Import GoLive Script Library setting is necessary if your component uses GoLive actions. Components are stored in the Components folder in the site's data folder and appear in the Extras tab in the site window and in the Site Extras set in the Objects palette. To use a component:
Do one of the following: To edit the component's source file:
Note: Components are updated only while you work on your local hard disk. To update components on the Web server, you must upload each component's source file and also the pages that use the component to update your site after changing a source file. To detach a component from its source file: Select the component on the page and choose Special > Detach Component. You can also choose Components > Detach Selected Component from the component's context menu and then click OK. The detached component is now fully a part of the page with no dependent link to the source file--changing the source file will no longer affect the detached component in the page. |