decorative banner

Using components


    You 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:

  1. In a new document window, add the desired content for the component--for example, a layout grid with your corporate logo and headline--and then click the Page icon Page icon in the upper left corner of the window.
  2. In the Page Inspector, click the HTML tab, and then click Component to set up the current page for use as a dynamic component.
  3. 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.

  4. Open the site window and do any of the following to save the page as a component:
    • Choose File > Save As, name the component, choose Components from the Site Folder menu, and click Save.
    • Choose Save As > Save As Component from the document window menu, name the component, and click Save.
    • In the site window, drag the page from the Files tab to the Components folder in the Extras tab.

    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:

    • In the Site Extras set in the Objects palette, choose Components from the pop-up menu at the bottom of the palette and drag the component's icon from the palette to the page.
    • From the Smart set in the Objects palette, drag the Component placeholder icon to the page. Then, in the Component Inspector, specify the destination of the link by dragging from the Point and Shoot button to the component's source file in the Extras tab in the site window.

To edit the component's source file:

  1. Double-click the component on the page to open the source file.
  2. Make the desired changes and save the source file.
  3. Click OK to update all pages that use the component.
  4. 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.