MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Manual do Utilizador Página 24

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 28
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 23
24
For example, ASP files contain—in addition to regular HTML—ASP code for the server to
interpret. ASP code looks almost like an HTML tag, but is marked by a pair of delimiters: it
begins with
<% and ends with %>. The Dreamweaver Configuration/ThirdPartyTags folder
contains a file named Tags.xml, which describes the format of various third-party tags, including
ASP code, and defines how Dreamweaver displays that code. Because of the way ASP code is
specified in Tags.xml, Dreamweaver doesnt try to interpret anything between the delimiters;
instead, in the Document window’s Design view, it simply displays an icon indicating ASP code.
You can define your own tag database files that define how Dreamweaver reads and displays your
tags. Create a new tag database file for each set of tags, to tell Dreamweaver how to display the tags.
Note: This section explains how to define the way Dreamweaver displays a custom tag, but doesn’t describe
how to provide a way to edit the content or properties of a custom tag. For information on how to create a
Property inspector to inspect and change the properties of a custom tag, see Extending Dreamweaver (Help >
Extending Dreamweaver).
Each tag database file defines the name, type, content model, rendering scheme, and icon for one
or more custom tags. You can create any number of tag database files, but all of them must reside
in the Configuration/ThirdPartyTags folder to be read and processed by Dreamweaver. Tag
database files have the file extension .xml.
Tip: If you are working on several different unrelated sites at once (for example, as a freelance developer), you can
put all the tag specifications for a particular site in one file. Then simply include that tag database file with the custom
icons and Property inspectors that you hand over to the people who will maintain the site.
You define a tag specification with an XML tag called tagspec. For example, the following code
describes the specification for a tag named
happy:
<tagspec tag_name="happy" tag_type="nonempty" render_contents="false"
content_model="marker_model" icon="happy.gif" icon_width="18"
icon_height="18"></tagspec>
You can define two different kinds of tags using tagspec: normal HTML-style tags and string-
delimited tags. String-delimited tags start with one string and end with another string; theyre like
empty HTML tags (such as
img) in that they dont surround content and dont have closing tags.
The
happy tag shown above is a normal HTML-style tag; it starts with an opening <happy> tag,
contains data between opening and closing tags, and ends with a closing
</happy> tag. (If the tag
were a string-delimited tag, the tag specification would include the
start_string and
end_string attributes.) An ASP tag is a string-delimited tag; it starts with the string <% and ends
with the string
%>, and it has no closing tag.
The following information describes the attributes and valid values for the
tagspec tag. Attributes
marked with an asterisk (*) are ignored for string-delimited tags. Optional attributes are marked in
the attribute lists with braces (
{}); all attributes not marked with braces are required.
<tagspec>
Description
Provides information about a third-party tag.
Attributes
tag_name, {tag_type}, {render_contents}, {content_model}, {start_string},
{end_string}, {detect_in_attribute}, {parse_attributes}, icon, icon_width,
icon_height, {equivalent_tag}, {is_visual}, {server_model}
Vista de página 23
1 2 ... 19 20 21 22 23 24 25 26 27 28

Comentários a estes Manuais

Sem comentários