21.5 ColdFusion Tags


Macromedia ColdFusion (formerly Allaire ColdFusion) also processes server-side scripts and delivers HTML pages to the user 's browser dynamically. For an overview of ColdFusion, see http://www.macromedia.com/software/coldfusion/.

For more on ColdFusion, see Programming ColdFusion by Rob Brooks-Bilson (O'Reilly).

ColdFusion Markup Language (CFML) uses HTML-style tags, as defined in the ColdFusion.xml file. For example, the following <tagspec> element tells Dreamweaver how to display a CFML tag named CFABORT :

 <tagspec tag_name="CFABORT" tag_type="empty" render_contents="false"   content_model="script_model" detect_in_attribute="true"   icon="ColdFusion.gif" icon_width="16" icon_height="16"> </tagspec> 

ColdFusion files have a .cfm or .cfml extension and can contain both CFML elements and HTML elements. CFML tag names begin with CF . For example, CFML offers a <CFFORM> element analogous to the HTML <form> element.Table 21-3 lists the CFML tags recognized in Dreamweaver by default. Many ColdFusion tags are not listed, but you can add them to the ColdFusion.xml file, as described earlier. With Macromedia's recent acquisition of ColdFusion, expect to see greater support for CFML tags in future versions of Dreamweaver and UltraDev.

Table 21-3. Recognized ColdFusion tags

Opening tag

Closing tag

Description

<CFABORT>

N/A

Aborts processing of CFML

<CFAPPLICATION>

N/A

Defines an application and activates its variables

<CFAPPLET>

N/A

Embeds Java applets in a CFFORM

<CFBREAK>

N/A

Breaks out of a loop

<CFCOL>

N/A

Defines a column in a CFTABLE

<CFCONTENT>

N/A

Defines the content type of an inserted file

<CFCOOKIE>

N/A

Sets cookie variables

<CFDIRECTORY>

N/A

Performs directory handling

<CFELSE>

N/A

Logical else (used with CFIF)

<CFELSEIF>

N/A

Logical else-if (used with CFIF)

<CFERROR>

N/A

Displays an error message

<CFFTP>

N/A

Performs FTP file transfers

<CFFORM>

</CFFORM>

Creates a CFML form

<CFGRID>

</CFGRID>

Creates a CFFORM grid

<CFGRIDCOLUMN>

N/A

Defines columns in CFGRID

<CFGRIDROW>

N/A

Defines rows in CFGRID

<CFHEADER>

N/A

Creates HTTP headers

<CFHTMLHEAD>

N/A

Writes an HTML page with <head> content

<CFHTTP>

</CFHTTP>

Performs HTTP GET or POST

<CFHTTPPARAM>

N/A

Sets parameters for CFHTTP POST

<CFIF>

</CFIF>

Logical if construct

<CFNCLUDE>

N/A

Includes another CFML file

<CFINDEX>

N/A

Creates Verity search index

<CFINPUT>

N/A

CFFORM input elements (radio buttons , etc.)

<CFINSERT>

N/A

Inserts record in ODBC data source

<CFLDAP>

N/A

LDAP directory services

<CFMAIL>

</CFMAIL>

Sends email

<CFMODULE>

N/A

Custom tag invocation

<CFOBJECT>

N/A

Used for COM, CORBA, or JAVA objects

<CFOUTPUT>

</CFOUTPUT>

Displays results

<CFPARAM>

N/A

Defines a parameter

<CFPOP>

N/A

Retrieves email

<CFQUERY>

</CFQUERY>

Performs a SQL query

<CFREPORT>

</CFREPORT>

Embeds Crystal Reports report

<CFROW>

</CFROW>

Defines a row in a CFTABLE

<CFSCHEDULE>

N/A

Schedules a page execution

<CFSCRIPT>

</CFSCRIPT>

Adds CFScript elements

<CFSEARCH>

N/A

Executes a search (used with CFINDEX)

<CFSELECT>

</CFSELECT>

Creates a selection element in a CFFORM

<CFSET>

N/A

Defines a variable

<CFSETTING>

N/A

Controls template settings

<CFSLIDER>

N/A

Creates a slider control in a CFFORM

<CFTABLE>

</CFTABLE>

Creates a table

<CFTEXTINPUT>

N/A

Creates a single-line text entry box in a CFFORM

<CFTRANSACTION>

</CFTRANSACTION>

Groups a batch of CFQUERY statements

<CFTREE>

</CFTREE>

Creates a tree control element in a CFFORM

<CFTREEITEM>

N/A

Creates a single tree item in a CFTREE element

<CFUPDATE>

N/A

Updates a data source

The next chapter shows how to extend Dreamweaver by using Extensions available through the Dreamweaver Exchange.



Dreamweaver in a Nutshell
Dreamweaver in a Nutshell
ISBN: B000C4SPTM
EAN: N/A
Year: 2005
Pages: 208

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net