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. You can save components with a specific site, or as application-wide components. 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. The Import GoLive Script Library setting is necessary if your component uses GoLive actions. Note: Site-specific components are stored in the site's web-data/Components folder and appear in the Components tab of the Library palette and the Extras tab of the site window. 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, choose Special > Detach Selected Component, and then click OK. You can detach all components on the page by choosing Special > Detach All Components. 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. |