beautypg.com

Defining editable tag attributes in templates, Specify editable tag attributes in a template, Make an editable tag attribute uneditable – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 527

background image

Defining editable tag attributes in templates

To the top

To the top

Specify editable tag attributes in a template
Make an editable tag attribute uneditable

Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this
article in Dreamweaver CC and later. For more information, see

this article

.

Specify editable tag attributes in a template

You can allow a template user to modify specified tag attributes in a document created from a template.

For example, you can set a background color in the template document, yet enable template users to set a different background color for pages
they create. Users can update only the attributes you specify as editable.

You can also set multiple editable attributes in a page so that template users can modify the attributes in template-based documents. The following
data types are supported: text, Boolean (true/false), color, and URL.

Creating an editable tag attribute inserts a template parameter in the code. An initial value for the attribute is set in the template document; when a
template-based document is created, it inherits the parameter. A template user can then edit the parameter in the template-based document.

Note: If you make the link to a style sheet an editable attribute, then the attributes of the style sheet are no longer available for either viewing or
editing in the template file.

1. In the Document window, select an item you want to set an editable tag attribute for.

2. Select Modify > Templates > Make Attribute Editable.

3. In the Attribute box, enter a name or select an attribute in the Editable Tag Attributes dialog box by doing one of the following:

If the attribute you want to make editable is listed in the Attribute pop-up menu, select it.

If the attribute you want to make editable isn’t listed in the Attribute pop-up menu, click Add, and in the dialog box that opens, enter the
name of the attribute you want to add, then click OK.

4. Make sure the Make Attribute Editable option is selected.

5. In the Label box, enter a unique name for the attribute.

To make it easier to identify a specific editable tag attribute later, use a label that identifies the element and the attribute. For example,
you might label an image whose source is editable logoSrc or label the editable background color of a body tag bodyBgcolor.

6. In the Type menu, select the type of value allowed for this attribute by setting one of the following options:

To enable a user to enter a text value for the attribute, select Text. For example, you can use text with the align attribute; the user can
then set the attribute’s value to left, right, or center.

To insert a link to an element, such as the file path to an image, select URL. Using this option automatically updates the path used in a
link. If the user moves the image to a new folder, the Update Links dialog box appears.

To make the color picker available for selecting a value, select Color.

To enable a user to select a true or false value on the page, select True/False.

To enable a template user to type a numerical value to update an attribute (for example, to change the height or width values of an
image), select Number.

7. The Default Value box displays the value of the selected tag attribute in the template. Enter a new value in this box to set a different initial

value for the parameter in the template-based document.

8. (Optional) If you want to make changes to another attribute of the selected tag, select the attribute and set the options for that attribute.

9. Click OK.

Make an editable tag attribute uneditable

A tag previously marked as editable can be marked as uneditable.

1. In the template document, click the element associated with the editable attribute or use the tag selector to select the tag.

2. Select Modify > Templates > Make Attribute Editable.

3. In the Attributes pop-up menu, select the attribute you want to affect.

4. Deselect Make Attribute Editable and click OK.

520

This manual is related to the following products: