Using templates with Contribute
Contribute administrators and users who want to maintain a certain look for their website can use templates created in Dreamweaver templates.
How templates work
A developer makes a template in Dreamweaver by creating a page and adding content that he/she wants to be present on all pages that use the template. A simple template might only contain a table with the logo and a background color for the page. A more complextemplate may have a full navigation system in place, additional content across the top of the page, and a footer containing copyright information along the bottom.
The power of templates, though, lies in the various methods of editing or modifying certain sections of the page. The template creator picks certain areas of the template that should remain editable or optional, and users who make pages from this template will only be able to edit (and add) the content in those specific areas.
For Contribute administrators who want more information about how to create a template in Dreamweaver MX, please see the Additional information section. For Contribute users interested in the discussion of a specific template feature, please see the How to use a template in Contribute section.You will only be able to add or change code within specified areas. The site administrator controls the Templates that you can use with Contribute.
Making a page from a template
In Contribute, you can edit an existing page based on a template and you can create a new page based on a template. To make a new page from a template, the site administrator must upload the template and allow users to make new pages from this template. Administrators can learn more about their options by reading Options for Contribute website administrators (TechNote 16611).
To make a new page from a template
- In Contribute, choose File > New Page.
- In the New Page dialog box, there will be a list of methods for creating a new page. Create a new page from by choosing the template from the Templates folder.
Note: If the needed template does not show up in the Templates folder, click the Refresh Templates button. - Select the name of the template you would like to use. The Preview pane will show you what it looks like.
- Specify a title for the page in the Page title field, then click OK to make the page.
How to use a template in Contribute
As described above, templates work by locking the majority of the page contents and allowing the template developer to specify certain editable areas or editable attributes. Any page based on a template, then, is uneditable except for those areas or attributes. There are four types of editable content that a template developer can set.
Editable Regions
An editable region is a space on the template-based page in which you can put in content. This is the most common template feature that you will be using. In Contribute, a basic editable area looks like the following image.
The light blue/green outline defines the editable region. In this example, the simple navigation bar above the editable region cannot be edited, but new content (text, a table or an image, for example) can be added within the green outline. In Contribute, you will only be able to add content within these areas. There may be more than one editable region in the template.
Repeat Regions
A repeat region is a feature that allows you to add (repeat) certain defined areas as needed. If a repeat region also contains an editable region (this will commonly be the case), you can add more content to the page. In Contribute, a standard repeat region looks like the following image.
Note that there is a mini-interface next to the repeat region. This set of buttons allows you to add a region by clicking the plus button, subtract a region by clicking the minus button, and reorder regions by clicking the up or down arrows. In this case the repeat region is a table cell that contains an editable area. By using a repeat region in the example above, the template for this page will dictate the overall appearance of the table, but the table itself can have as many cells as needed for the content.
Optional Regions
Optional regions are just that: optional. While editing a page based on a template that uses an optional region, a Contribute user can choose to show or hide that optional region. To access optional regions in Contribute, a user must choose Format > Template Properties. The image below shows the Template Properties dialog box containing an optional region.
To switch the status of the optional region, highlight the region name (there may be more than one) and then check the box to show it, or uncheck the box to not show it.
Editable Attributes and Template Parameters
When creating a template, a developer can choose to make a certain tag attributes editable. For example, the developer may choose to allow the background color attribute of the BODY tag be editable in pages based on the template. Any editable attribute will appear in the Template Properties dialog box, in addition to optional regions. Developers can also specify custom parameters that might enable users to edit attributes. You may be able to set colors, images or other page parameters that have been set in the template. Access the editable attributes by choosing Format > Template Properties.
When working in a page based on a template, make a point of checking the Template Properties. You may have more options than you think.
Additional information
For more information on templates, check out these Dreamweaver TechNotes and articles:
New template features in Dreamweaver MX (TechNote #16347)
Custom parameters and expressions in Dreamweaver MX templates (TechNote #16317)
Consistent Design with Dreamweaver MX Templates
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
