m content_model describes what kinds of content the tag can contain and where in an HTML file the tag can appear. Valid values are"blockmodel","head_model", block_mode l specifies that the tag can contain block-level elements such as div and p, and that the nly in the body I head_model specifies that the tag can contain text content and that it can appear only marker_model specifies that the tag can contain any valid HTML code, and that it can appear anywhere in an HTML file. The hTMl validator in Dreamweaver ignores ags that are specified as marker_model. However, the validator doesn't ignore the contents of such a tag; so even though the tag itself can appear anywhere, the contents of the tag may result in invalid HTML in certain places. For example, plain text annot appear(outside a valid head element)in the head section of a document, so you cant place a marker_model tag that contains plain text in the head section. To place a custom tag containing plain text in the head section, specify the tag s content model as head_model instead of marker_model. Use marker_model for tags that should be displayed inline(inside a block-level element such as p or div-for example inside a paragraph). If the tag should be displayed as a paragraph of its own, with line breaks before and after it, dont use this model script_mode l lets the tag exist anywhere between the opening and closing HTML ags of a document. When Dreamweaver encounters a tag with this model, it ignores all of the tags content. Used for markup(such as certain Cold Fusion tags)that start__string specifies a delimiter that marks the beginning of a string-delimited tag ing delimited tags can appear anywhere in the document where a comment can appear Dreamweaver does not parse tags or decode entities or URLs between start_string and end_string. This attribute is required if end_string is specified end_string specifies a delimiter that marks the end of a string-delimited tag. This attribute is required if start_string is specified. lays to customize Dreamweaver 23
Ways to customize Dreamweaver 23 ■ content_model describes what kinds of content the tag can contain and where in an HTML file the tag can appear. Valid values are "block_model", "head_model", "marker_model", and "script_model": ■ block_model specifies that the tag can contain block-level elements such as div and p, and that the tag can appear only in the body section or inside other body-content tags such as div, layer, or td. ■ head_model specifies that the tag can contain text content and that it can appear only in the HEAD section. ■ marker_model specifies that the tag can contain any valid HTML code, and that it can appear anywhere in an HTML file. The HTML validator in Dreamweaver ignores tags that are specified as marker_model. However, the validator doesn’t ignore the contents of such a tag; so even though the tag itself can appear anywhere, the contents of the tag may result in invalid HTML in certain places. For example, plain text cannot appear (outside a valid head element) in the head section of a document, so you can’t place a marker_model tag that contains plain text in the head section. (To place a custom tag containing plain text in the head section, specify the tag’s content model as head_model instead of marker_model.) Use marker_model for tags that should be displayed inline (inside a block-level element such as p or div—for example, inside a paragraph). If the tag should be displayed as a paragraph of its own, with line breaks before and after it, don’t use this model. ■ script_model lets the tag exist anywhere between the opening and closing HTML tags of a document. When Dreamweaver encounters a tag with this model, it ignores all of the tag’s content. Used for markup (such as certain ColdFusion tags) that Dreamweaver shouldn’t parse. ■ start_string specifies a delimiter that marks the beginning of a string-delimited tag. String delimited tags can appear anywhere in the document where a comment can appear. Dreamweaver does not parse tags or decode entities or URLs between start_string and end_string. This attribute is required if end_string is specified. ■ end_string specifies a delimiter that marks the end of a string-delimited tag. This attribute is required if start_string is specified
a detect_in_attribute indicates whether to ignore everything between start_string and end_string(or between opening and closing tags if those strings are not defined) even when those strings appear inside attribute names or values. You should generally set this to"true "for string-delimited tags. The default is"false. For example, ASP tags sometimes appear inside attribute values, and sometimes contain quotation marks () Because the ASP tag specification specifies detect_in_attribute=true", Dreamweaver ignores the ASP tags, including the internal quotation marks, when they appear inside attribute values parse_attributes indicates whether to parse the attributes of the tag. If this is set to true"(the default), Dreamweaver parses the attributes; if it's set to"false Dreamweaver ignores everything until the next closing angle bracket that appears outside quotation marks. For example, this attribute should be set to"false"for a tag such as cfif(as in <cfif a is 1>, which Dreamweaver cannot parse as a set of attribute name/ i con specifies the path and filename of the icon associated with the tag. This attribute is required for empty tags, and for nonempty tags whose contents do not appear in the Document windows Design view icon_width specifies the width of the icon in pixels icon_height specifies the height of the icon in pixels equivalent_tag specifies simple hTml equivalents for certain Cold Fusion form-related tags. This is not intended for use with other tags is_visual indicates whether the tag has a direct visual effect on the page. For example the Cold Fusion tag cfgraph doesn't specify a value for isvisual(so the value default to"true"); the Cold Fusion tag cfset is specified as having is_visual set to"false Visibility for server markup tags is controlled by the Invisible Elements category of the Preferences dialog box; visibility for visual server markup tags can be set independent of server_model, if specified, indicates that the tagspec tag applies only on pages that belong to the specified server model. If server_model is not specified, the tagspec tag applies on all pages. For example, the delimiters for ASP and JSP tags are the same, but th tagspec tag for JSP specifies a server_model of "JSP", so when dreamweaver encounters code with the appropriate delimiters on a Jsp page, it displays a JSi encounters such code on a non-JSP page, it displays an ASP icon. None(empty tag). 24 Customizing Dreamweaver
24 Customizing Dreamweaver ■ detect_in_attribute indicates whether to ignore everything between start_string and end_string (or between opening and closing tags if those strings are not defined) even when those strings appear inside attribute names or values. You should generally set this to "true" for string-delimited tags. The default is "false". For example, ASP tags sometimes appear inside attribute values, and sometimes contain quotation marks ("). Because the ASP tag specification specifies detect_in_attribute="true", Dreamweaver ignores the ASP tags, including the internal quotation marks, when they appear inside attribute values. ■ parse_attributes indicates whether to parse the attributes of the tag. If this is set to "true" (the default), Dreamweaver parses the attributes; if it’s set to "false", Dreamweaver ignores everything until the next closing angle bracket that appears outside quotation marks. For example, this attribute should be set to "false" for a tag such as cfif (as in <cfif a is 1>, which Dreamweaver cannot parse as a set of attribute name/ value pairs). ■ icon specifies the path and filename of the icon associated with the tag. This attribute is required for empty tags, and for nonempty tags whose contents do not appear in the Document window’s Design view. ■ icon_width specifies the width of the icon in pixels. ■ icon_height specifies the height of the icon in pixels. ■ equivalent_tag specifies simple HTML equivalents for certain ColdFusion form-related tags. This is not intended for use with other tags. ■ is_visual indicates whether the tag has a direct visual effect on the page. For example, the ColdFusion tag cfgraph doesn’t specify a value for is_visual (so the value defaults to "true"); the ColdFusion tag cfset is specified as having is_visual set to "false". Visibility for server markup tags is controlled by the Invisible Elements category of the Preferences dialog box; visibility for visual server markup tags can be set independent of visibility for nonvisual server markup tags. ■ server_model, if specified, indicates that the tagspec tag applies only on pages that belong to the specified server model. If server_model is not specified, the tagspec tag applies on all pages. For example, the delimiters for ASP and JSP tags are the same, but the tagspec tag for JSP specifies a server_model of "JSP", so when Dreamweaver encounters code with the appropriate delimiters on a JSP page, it displays a JSP icon. When it encounters such code on a non-JSP page, it displays an ASP icon. Contents None (empty tag)
Containe Example tagspec tag_name="happy"tag_type="nonempty"render_contents="false content_mode]="marker_model"icon="happy. gif"icon_width="18 icon_height="18"></tagspec> How custom tags appear in the design view The way that custom tags appear in the Design view of the Document window depends on the values of the tag_type and render_contents attributes of the tagspec tag(See Customizing the interpretation of third-party tags"on page 21. If the value of tag_type is empty",the icon specified in the icon attribute appears. If the value of tag_type is nonempty"but the value of render_contents is"false, the icon appears as it would for an empty tag. The following example shows how an instance of the happy tag defined earlier might appear in the HTML: <p>This is a paragraph that includes an instance of the <code>happy </code> tag (<happy >Joe</happy>).</p> Because render__contents is set to"false" in the tag specification, the contents of the happy tag(the word Joe)are not rendered. Instead, the start and end tags and their contents appear as a single icon. For nonempty tags that have a render_contents value of"true", the icon does not appear in the Design view; instead, the content between the opening and closing tags(such as th text between the tags in <mytag>This is the content between the opening and closing tags</mytag>)appears. If View Invisible Elements is enabled, the content is highlighted using the third-party tag color specified in Highlighting preferences highlighting applies only to tags defined in tag database files. To change the highlighting color of third-party tags 1. Select Edit Preferences, and select the Highlight 2. Click the Third-Party Tags color box to display the color picker 3. Select a color, and click oK to close the Preferences dialog box. For information about selecting a color, see Using dreamweaver /ays to customize Dreamweaver 24
Ways to customize Dreamweaver 25 Container None. Example <tagspec tag_name="happy" tag_type="nonempty" render_contents="false" content_model="marker_model" icon="happy.gif" icon_width="18" icon_height="18"></tagspec> How custom tags appear in the Design view The way that custom tags appear in the Design view of the Document window depends on the values of the tag_type and render_contents attributes of the tagspec tag. (See “Customizing the interpretation of third-party tags” on page 21.) If the value of tag_type is "empty", the icon specified in the icon attribute appears. If the value of tag_type is "nonempty" but the value of render_contents is "false", the icon appears as it would for an empty tag. The following example shows how an instance of the happy tag defined earlier might appear in the HTML: <p>This is a paragraph that includes an instance of the <code>happy</code> tag (<happy>Joe</happy>).</p> Because render_contents is set to "false" in the tag specification, the contents of the happy tag (the word Joe) are not rendered. Instead, the start and end tags and their contents appear as a single icon. For nonempty tags that have a render_contents value of "true", the icon does not appear in the Design view; instead, the content between the opening and closing tags (such as the text between the tags in <mytag>This is the content between the opening and closing tags</mytag>) appears. If View > Invisible Elements is enabled, the content is highlighted using the third-party tag color specified in Highlighting preferences. (Highlighting applies only to tags defined in tag database files.) To change the highlighting color of third-party tags: 1. Select Edit > Preferences, and select the Highlighting category. 2. Click the Third-Party Tags color box to display the color picker. 3. Select a color, and click OK to close the Preferences dialog box. For information about selecting a color, see Using Dreamweaver
Avoiding rewriting third-party tags Dreamweaver corrects certain kinds of errors in HTML code. For details, see Using Dreamweaver. By default, Dreamweaver refrains from changing HTML in files with certain filename extensions, including. asp(ASP).cfm(Cold Fusion),jsp SP), and Php(PHP) This default is set so that Dreamweaver does not accidentally modify the code contained in any such non-HTML tags. You can change the Dreamweaver default rewriting behavior that it rewrites HTML when it opens such files, and you can add other file types to the list of ypes that Dreamweaver does not rewrite Dreamweaver encodes certain special characters by replacing them with numerical when you enter them in the Property inspector. It's usually best to let Dreamweaver perform this encoding because the special characters are more likely to display correctly across latforms and browsers. However, because such encoding can interfere with third-party tags, ou may want to change the Dreamweaver encoding behavior when you're working with files that contain third-party tags To allow Dreamweaver to rewrite html in more kinds of files 1. Select Edit Preferences, and select the Code rewriting category 2. Select either of the following options Fix Invalidly Nested and Unclosed Tags Remove Extra Closing Tags 3. Do one of the following: s Delete one or more extensions from the list of extensions in the Never rewrite Code: In Files with Extensions option. Deselect the Never Rewrite Code: In Files with Extensions option (Deselecting this option lets Dreamweaver rewrite HTML in all types of files. To add file types that Dreamweaver should not rewrite: 1. Select Edit > Preferences, and select the Code Rewriting category 2. Select either of the following options Fix Invalidly Nested and Unclosed Tag ing Tags 3. Make sure the Never Rewrite Code: In Files with Extensions option is selected, and add the new file extensions to the list in the text field If the new file type doesnt appear in the file-types pop-up menu in the File >Open dialog box, you might want to add it to the Configuration/Extensions. txt file. For details, see Changing the default file type"on page 20 26 Customizing Dreamweaver
26 Customizing Dreamweaver Avoiding rewriting third-party tags Dreamweaver corrects certain kinds of errors in HTML code. For details, see Using Dreamweaver. By default, Dreamweaver refrains from changing HTML in files with certain filename extensions, including .asp (ASP), .cfm (ColdFusion), .jsp (JSP), and .php (PHP). This default is set so that Dreamweaver does not accidentally modify the code contained in any such non-HTML tags. You can change the Dreamweaver default rewriting behavior so that it rewrites HTML when it opens such files, and you can add other file types to the list of types that Dreamweaver does not rewrite. Dreamweaver encodes certain special characters by replacing them with numerical values when you enter them in the Property inspector. It’s usually best to let Dreamweaver perform this encoding because the special characters are more likely to display correctly across platforms and browsers. However, because such encoding can interfere with third-party tags, you may want to change the Dreamweaver encoding behavior when you’re working with files that contain third-party tags. To allow Dreamweaver to rewrite HTML in more kinds of files: 1. Select Edit > Preferences, and select the Code Rewriting category. 2. Select either of the following options: ■ Fix Invalidly Nested and Unclosed Tags ■ Remove Extra Closing Tags 3. Do one of the following: ■ Delete one or more extensions from the list of extensions in the Never Rewrite Code: In Files with Extensions option. ■ Deselect the Never Rewrite Code: In Files with Extensions option. (Deselecting this option lets Dreamweaver rewrite HTML in all types of files.) To add file types that Dreamweaver should not rewrite: 1. Select Edit > Preferences, and select the Code Rewriting category. 2. Select either of the following options: ■ Fix Invalidly Nested and Unclosed Tags ■ Remove Extra Closing Tags 3. Make sure the Never Rewrite Code: In Files with Extensions option is selected, and add the new file extensions to the list in the text field. If the new file type doesn’t appear in the file-types pop-up menu in the File > Open dialog box, you might want to add it to the Configuration/Extensions.txt file. For details, see “Changing the default file type” on page 20
To turn off Dreamweaver encoding options: 1. Select Edit > Preferences, and select the Code Rewriting category 2. Deselect either or both Special Characters options For information on the other Code Rewriting preferences, see Using Dreamweaver. Customizing dreamweaver in a multiuser environment You can customize Dreamweaver in a multiuser operating system such as Windows 2000 Windows XP, or Mac OS X Dreamweaver prevents any user's customized configuration from in Dreamweaver in a multiuser operating system that it recognizes, Dreamweaver copic e ecting any other user's customized configuration. To accomplish this goal, the first time yo Dreamweaver by using dialog boxes and panels, the application modifies your lser mize iguration files into a user Configuration folder for you. When you Configuration files instead of modifying the Dreamweaver Configuration files. To customize Dreamweaver by editing a configuration file in a multiuser environment, edit the appropriat user Configuration file, rather than editing the files in the Dreamweaver Configuration folder To make a change that affects most users, you can edit a Dreamweaver Configuration file, but users who already have corresponding user-configuration files will not see the change In general, if you want to make a change that affects all the users, it's best to create an extension and install it using the Extension Manager z In older operating systems(Windows 98, Windows ME, and Mac OS 9.x), a single setof a Dreamweaver Configuration files is shared by all users, even if the operating system is configured to support multiple users. The location of the user's Configuration folder depends on the user's platform Windows 2000 and Windows XP platforms use the following location drive: \Documents and Settingslusername\Application Data mAcromedia\ Dreamweaver 8\ Configuration 3 In Windows XP, this folder may be inside a hidden folder Customizing Dreamweaver in a multiuser environment 2
Customizing Dreamweaver in a multiuser environment 27 To turn off Dreamweaver encoding options: 1. Select Edit > Preferences, and select the Code Rewriting category. 2. Deselect either or both Special Characters options. For information on the other Code Rewriting preferences, see Using Dreamweaver. Customizing Dreamweaver in a multiuser environment You can customize Dreamweaver in a multiuser operating system such as Windows 2000, Windows XP, or Mac OS X. Dreamweaver prevents any user’s customized configuration from affecting any other user’s customized configuration. To accomplish this goal, the first time you run Dreamweaver in a multiuser operating system that it recognizes, Dreamweaver copies various configuration files into a user Configuration folder for you. When you customize Dreamweaver by using dialog boxes and panels, the application modifies your user Configuration files instead of modifying the Dreamweaver Configuration files. To customize Dreamweaver by editing a configuration file in a multiuser environment, edit the appropriate user Configuration file, rather than editing the files in the Dreamweaver Configuration folder. To make a change that affects most users, you can edit a Dreamweaver Configuration file, but users who already have corresponding user-configuration files will not see the change. In general, if you want to make a change that affects all the users, it’s best to create an extension and install it using the Extension Manager. The location of the user’s Configuration folder depends on the user’s platform. Windows 2000 and Windows XP platforms use the following location: drive:\Documents and Settings\username\Application Data\Macromedia\ Dreamweaver 8\Configuration NOTE In older operating systems (Windows 98, Windows ME, and Mac OS 9.x), a single set of Dreamweaver Configuration files is shared by all users, even if the operating system is configured to support multiple users. NOTE In Windows XP, this folder may be inside a hidden folder