blog top 101 other stuff

creating and using components in golive

creating a component document

Stationery documents are a wonderful way to easily build pages with a consistent appearance across your entire site. The only problem is that if you make a change to the original Stationery document it doesn’t change the existing pages you created using that file.

That’s where Components come in. Components are bits of code that can be embedded in a page, including Stationery documents, and which update automatically when the original Component is changed.

1. Prepare the Component
Open your site in GoLive and create a new page. Click on the Page icon in the upper left corner of the Editor window (upper right corner in GoLive CS) and open the Inspector. Click on the HTML tab. Click the button at the bottom marked Component. If the button is grayed out, then all the settings are already correct.

2. Build the Component
Add the elements you want in your Component. Since Components are designed to be inserted in other pages, you’ll want to keep this document as simple as possible. The elements will generally be things you plan to change frequently, like navigation links.

3. Save the page as a Component
From the File menu select Save As... and give the page a name suitable for a template (such as navigation_component.html). Don’t click Save yet.

Choose Components from the special pop-up menu at the bottom of the Save As dialog box (this shot will look different in Windows). This will take you to the Components folder for your site. Click Save.

<-- Back to Introduction | Using a Component in your page -->