• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Automating Dreamweaver > Editable Tag Attributes

Editable Tag Attributes

New in Dreamweaver MX, you can choose to make certain tag attributes editable in template pages.

To set a tag attribute as editable:

1.
On the template document, click on the object or text you want to edit, and select its tag in the tag selector (Figure 17.56).

Figure 17.56. On this template, normally the top headline would not be editable. I'm going to allow attributes of the <font> tag to be edited, so I click on the text and then select the <font> tag in the Tag selector.


2.
From the menu bar, select Modify > Templates > Make Attribute Editable. The Editable Tag Attributes dialog box will appear (Figure 17.57).

Figure 17.57. The Editable Tag Attributes dialog box.


3.
Select your attribute from the Attribute drop-down menu (Figure 17.58).

Figure 17.58. Select an attribute you've already applied to the tag from the Attribute drop-down menu. For additional attributes, click Add.


Only those attributes already applied to the tag will appear in the menu; to add another, click Add. A dialog box will appear (Figure 17.59); type your attribute in the text box and click OK to return to the Editable Tag Attributes dialog box.

Figure 17.59. Click Add and specify an additional attribute in the Editable Tag dialog box. For example, I could add the “width” attribute to a table cell even if I hadn't yet added it in the Document window.


4.
With your attribute selected in the Attribute drop-down menu, check the Make Attribute Editable check box; more options will appear (Figure 17.60).

Figure 17.60. When you check the Make Attribute Editable check box, more options will become visible.


5.
Label your attribute something memorable, like sidebarColor or catalogImage.

6.
Now, from the Type drop-down menu, choose how the attribute can be edited on template pages (Figure 17.61):

  • Text allows the user to type a value.

  • URL allows the user to set a local path for a page, an image, or a media object.

  • Color allows the user to use the color picker.

  • True/False is used mainly for JavaScript and CSS functions.

  • Number limits the entries to numbers, for items such as height or Vspace.

Figure 17.61. Select the way in which your attribute should be editable.


7.
Type a Default Value—which will show up on the page until it's changed—in that text box.

8.
Repeat steps 4 through 7 for additional attributes.

9.
Click OK to save your changes.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint