Tags

Tags are at the core of Lucee Server's templating language.

CFML Tags can also be called via <cfscript>. Usually you don't even need the CF prefix, but you need it in some cases when there is an existing function with the same name. You can also omit () when using the script syntax for tags.

cflog(text="I called a tag from script");  // use cflog, because there is already a maths Log() function

cfhttp(url="https://docs.lucee.org"); http url="https://docs.lucee.org";

cflocation(url="https://dev.lucee.org"); location url="https://dev.lucee.org";

You can also assign default values for any tag's attributes using this.tag.tagname.attribute in Application.cfc.

this.tag.cfhttp.username = "system";
this.tag.log.file = "my-custom-log.log";
this.tag.cflocation.addtoken = false;

Tags can be called with a struct containing the attributes using attributeCollection, Functions use argumentCollection

attrs = { url="https://dev.lucee.org", addToken="false" };
location attributeCollection=attrs;
cflocation(attributeCollection=attrs);
_
<cf_socialplugin> The ` ` tag is not supported by Lucee.
A
<cfabort> **Stops processing of a page at the tag location.** CFML returns everything that was processed before the cfabort tag. The cfabort tag is often used with conditional logic to stop processing a page when a condition occurs.
<cfajaximport> Controls the JavaScript files that are imported for use on pages that use Luceex AJAX tags and features.
<cfajaxproxy> Creates a JavaScript proxy for a component, for use in an AJAX client. Alternatively, creates a proxy for a single CFC method, JavaScript function, or URL that is bound to one or more control attribute values.
<cfargument> Allows subtag data to be saved with the base tag. Applies only to custom tags.
<cfassociate> Allows subtag data to be saved with the base tag. Applies only to custom tags.
<cfauthenticate> Authenticates a user, setting a security context for the application. For more information, see the descriptions of IsAuthenticated and AuthenticatedContext.
B
<cfbreak> Used to break out of a cfloop,cfwhile or cfforeach.
C
<cfcache> Speeds up page rendering when dynamic content
<cfcalendar> The tag ` ` is not supported by Lucee.
<cfcase> Handle one case of a cfswitch
<cfcatch> Used only inside a cftry, the cfcatch tag catches and process exceptions.
<cfchart> Generates and displays a chart.
<cfchartdata> Used with the cfchart and cfchartseries tags. This tag defines chart data points. Its data is submitted to the cfchartseries tag.
<cfchartseries> Used with the cfchart and cfchartseries tags. This tag defines chart data points. Its data is submitted to the cfchartseries tag.
<cfclient> The ` ` tag is not supported by Lucee.
<cfclientsetting> The ` ` tag is not supported by Lucee.
<cfcol> Defines table column header, width, alignment, and text. Used only inside a cftable.
<cfcollection> Allows you to create and administer Search collections.
<cfcomponent> Creates and defines a component object
<cfcontent> Defines the MIME type returned by the current page. Optionally, lets you specify the name of a file to be returned with the page.
<cfcontinue> Used within a cfloop tag. Returns processing to the top of a loop.
<cfcookie> Defines cookie variables, including expiration and security options.
D
<cfdbinfo> Lets you retrieve information about a data source, including details about the database, tables, queries, procedures, foreign keys, indexes, and version information about the database, driver, and JDBC. This tag supports only JDBC drivers, and does not support ODBC-based drivers, including the Microsoft Access driver.
<cfdefaultcase> Defines a default action inside a cfswitch statement, when none of the cfcase condition statements are true.
<cfdirectory> Handles interactions with directories.
<cfdistributedlock> Redis based lock that can be used across servers
<cfdiv> Creates an HTML tag with specified contents and lets you to use bind expressions to dynamically control the tag contents.
<cfdocument> Creates a PDF document from a text block containing CFML and HTML.
<cfdocumentitem> Specifies action items for a PDF document created by the cfdocument tag.
<cfdocumentsection> Divides a PDF document into sections.
<cfdump> Outputs the elements, variables and values of most kinds of CFML objects. Useful for debugging. You can display the contents of simple and complex variables, objects, components, user-defined functions, and other elements.
E
<cfelse> Used with cfelse and cfelseif, cfif lets you create simple and compound conditional statements in CFML. The value in the cfif tag can be any expression.
<cfelseif> Used with cfelse and cfelseif, cfif lets you create simple and compound conditional statements in CFML. The value in the cfif tag can be any expression.
<cferror> Enables the display of customized HTML pages when errors occur. This lets you maintain a consistent look and feel within your application, even when errors occur.
<cfexchangecalendar> The ` ` tag is not supported by Lucee.
<cfexchangeconnect> The ` ` tag is not supported by Lucee.
<cfexchangecontact> The ` ` tag is not supported by Lucee.
<cfexchangeconversation> The ` ` tag is not supported by Lucee.
<cfexchangefilter> The ` ` tag is not supported by Lucee.
<cfexchangefolder> The ` ` tag is not supported by Lucee.
<cfexchangemail> The ` ` tag is not supported by Lucee.
<cfexchangetask> The ` ` tag is not supported by Lucee.
<cfexecute> Enables developers to execute a process on a server computer.
<cfexit> Used to: Abort the processing of the currently executing CFML custom tag, exit the template within the currently executing CFML custom tag and re-execute a section of code within the currently executing CFML custom tag
F
<cffeed> Reads or creates an RSS or Atom syndication feed. This tag can read various RSS and Atom 0.3 versions. It can create RSS 2.0 or Atom 1.0 feeds.
<cffile> Handles all interactions with files
<cffileupload> This tag is not supported by Lucee.
<cffinally> Used inside a cftry tag. Code in the cffinally block is processed after the main cftry code and, if an exception occurs, the cfcatch code. The cffinally block code always executes, whether or not there is an exception.
<cfflush> Flushes currently available data to the client.
<cfform> Builds a form with CFML custom control tags that provide more functionality than standard HTML form input elements (XML and Flash type not supported).
<cfformgroup> The ` ` tag is not supported by Lucee.
<cfformitem> The ` ` tag is not supported by Lucee.
<cfforward> Leads the request to a different page. This tag acts like the tag cflocation except that the relocation is done directly on the server.
<cfftp> Lets users implement File Transfer Protocol (FTP) operations.
<cffunction> Defines a function that can accept arguments and return a value.
G
<cfgrid> The ` ` tag is not supported by Lucee.
<cfgridcolumn> The ` ` tag is not supported by Lucee.
<cfgridrow> The ` ` tag is not supported by Lucee.
<cfgridupdate> The ` ` tag is not supported by Lucee.
H
<cfheader> Generates custom HTTP response headers to return to the client.
<cfhtmlbody> Writes the text specified in the text attribute to the 'body' section of a generated HTML page. The cfhtmlbody tag can be useful for embedding JavaScript code, or placing other HTML tags that should go at the bottom of the page just before the closing body tag.
<cfhtmlhead> Writes the text specified in the text attribute to the 'head' section of a generated HTML page. The cfhtmlhead tag can be useful for embedding JavaScript code, or placing other HTML tags such, as META, LINK, TITLE, or BASE in an HTML page header.
<cfhtmltopdf> The ` ` tag is not supported by Lucee.
<cfhtmltopdfitem> The ` ` tag is not supported by Lucee.
<cfhttp> Lets you execute HTTP POST and GET operations on files.
<cfhttpparam> Required for cfhttp POST operations, cfhttpparam is used to specify the parameters necessary to build a cfhttp POST.
I
<cfif> Used with cfelse and cfelseif, cfif lets you create simple and compound conditional statements in CFML. The value in the cfif tag can be any expression.
<cfimage> Lets you resize and add labels to GIF and JPEG format images.
<cfimap> Retrieves and deletes messages from an IMAP email server.
<cfimapfilter> The ` ` tag is not supported by Lucee.
<cfimport> To import a JSP Tag Library or a CFML Custom Tag Directory
<cfinclude> Lets you embed references to pages in CFML. You can embed cfinclude tags recursively. For an additional method of encapsulating CFML
<cfindex> Populates a full text search collections with indexed data.
<cfinput> Used inside cfform to place radio buttons, checkboxes, or text boxes. Provides input validation for the specified control type.
<cfinsert> Inserts records in data sources.
<cfinterface> Defines an interface that consists of a set of signatures for functions.
<cfinvoke> Invokes component methods from within a page or component. You use this tag to reference a WSDL file and consume a web service from within a block of CFML code.
<cfinvokeargument> Argument for the Invoke Tag
L
<cfldap> Provides an interface to LDAP Lightweight Directory Access Protocol directory servers like the Netscape Directory Server.
<cflocation> Redirect the current request to another URL.
<cflock> Provides two types of locks to ensure the integrity of shared data: Exclusive lock and Read-only lock.
<cflog> Writes a message to a log file.
<cflogin> A container for user login and authentication code.
<cfloginuser> Identifies an authenticated user to ColdFusion. Specifies the user ID and roles. Used within a cflogin tag.
<cflogout> Logs the current user out. Removes knowledge of the user ID, password, and roles from the server. If you do not use this tag, the user is automatically logged out when the session ends.
<cfloop> Looping is a very powerful programming technique that lets you repeat a set of instructions or display output repeatedly until one or more conditions are met. cfloop supports five types of loops.
M
<cfmail> Sends e-mail messages by an SMTP server.
<cfmailparam> Can either attach a file or add a header to a message. It is nested within a cfmail tag. You can use more than one cfmailparam tag within a cfmail tag.
<cfmailpart> Specifies one part of a multipart e-mail message. Can only be used in the cfmail tag. You can use more than one cfmailpart tag within a cfmail tag
<cfmap> This are provided for backwards compatibility, and should be considered deprecated These tags are quite limited and difficult to extend, it's recommended to use a modern javascript mapping API instead.
<cfmapitem> Used with <cfmap>, this tag lets you add markers on the map. This tag is deprecated
<cfmenu> The ` ` tag is not supported by Lucee.
<cfmenuitem> The ` ` tag is not supported by Lucee.
<cfmessagebox> The ` ` tag is not supported by Lucee.
<cfmodule> Invokes a custom tag for use in cfml templates. The cfmodule tag can help deal with custom tag name conflicts. Use the template attribute to name a template that contains the custom tag definition, including its path..
N
<cfntauthenticate> The ` ` tag is not supported by Lucee.
O
<cfoauth> The ` ` tag is not supported by Lucee.
<cfobject> Lets you call methods in COM, CORBA, and JAVA objects.
<cfobjectcache> Flushes an object cache or returns the current size.
<cfoutput> Displays the results of a database query or other operation. To nest cfoutput tags, see the &quot;Usage&quot; section.
P
<cfpageencoding> A string literal; the character encoding to use to read the page. The value may be enclosed in single or double quotation marks, or none.
<cfparam> Tests for a parameter's existence, tests its data type, and provides a default value if one is not assigned.
<cfpdf> Manipulates existing PDF documents.
<cfpdfparam> Provides additional information for the cfpdf tag. The cfpdfparam tag applies only to the merge action of the cfpdf tag and is always a child tag of the cfpdf tag.
<cfpod> The ` ` tag is not supported by Lucee.
<cfpop> Retrieves and deletes e-mail messages from a POP mail server.
<cfpresentation> The ` ` tag is not supported by Lucee.
<cfpresentationslide> The ` ` tag is not supported by Lucee.
<cfpresenter> The ` ` tag is not supported by Lucee.
<cfprint> The ` ` tag is not supported by Lucee.
<cfprocessingdirective> Suppresses extra white space and other output, produced by CFML within the tag's scope.
<cfprocparam> Specifies parameter information, including type, name, value, and length. The cfprocparam tag is nested within a cfstoredproc tag.
<cfprocresult> Specifies a result set name that other tags, such as cfoutput and cftable, use to access the result set. It also lets you optionally identify which of the stored procedure's result sets to return. The cfprocresult tag is nested within a cfstoredproc tag.
<cfprogressbar> The ` ` tag is not supported by Lucee.
<cfproperty> Defines components as complex types that are used for web services authoring. The attributes of this tag are exposed as component metadata and are subject to inheritance rules.
Q
<cfquery> Passes SQL statements to a data source. Not limited to queries.
<cfqueryparam> Checks the data type of a query parameter.
R
<cfregistry> Reads, writes, and deletes keys and values in the system registry. The cfregistry tag is supported on all platforms, including Linux, Solaris, and HP-UX.
<cfreport> The ` ` tag is not supported by Lucee.
<cfreportparam> The ` ` tag is not supported by Lucee.
<cfrethrow> Rethrows the currently active exception. Preserves the exception's cfcatch.type and cfcatch. agContext information.
<cfretry> used to jump from a catch block, back to the beginning of the try block.
<cfreturn> Returns result values from a component method. Contains an expression returned as result of the function.
S
<cfsavecontent> Saves the generated content inside the tag body in a variable.
<cfschedule> Provides a programmatic interface to the scheduling engine. You can run a specified page at scheduled intervals with the option to write out static HTML pages. This lets you offer users access to pages that publish data, such as reports, without forcing users to wait while a database transaction is performed in order to populate the data on the page
<cfscript> Encloses a code segment containing cfscript.
<cfsearch> Executes searches against data indexed
<cfselect> Used inside cfform, cfselect lets you construct a drop-down list box form control. You can populate the drop-down list box from a query, or using the option tag. Use option elements to populate lists. The syntax for the option tag is the same as for its HTML counterpart.
<cfservlet> This tag has been deprecated and is non-functional.
<cfservletparam> This tag has been deprecated and is non-functional.
<cfset> Define a CFML variable. If the variable exists, cfset resets it to the specified value.
<cfsetting> Controls various aspects of page processing, such as the output of HTML code in pages. One benefit of this option is managing whitespace that can occur in output pages served by CFML.
<cfsharepoint> The ` ` tag is not supported by Lucee.
<cfsilent> Suppresses all output that is produced by the CFML within the tag's scope.
<cfsleep> Pauses the execution of the page for a given interval
<cfslider> Used inside cfform, cfslider lets you place a slider control in a CFML form. A slider control is like a sliding volume control. The slider groove is the area over which the slider moves.
<cfspreadsheet> The ` ` tag is not supported by Lucee. Third party support is available via the following projects:
<cfsprydataset> The ` ` tag is not supported by Lucee.
<cfstatic> defines a static constructor within components
<cfstopwatch> Stops the time from startTag to endTag
<cfstoredproc> Executes stored procedures by an ODBC or native connection to a server database. It specifies database connection information and identifies the stored procedure.
<cfswitch> Used with cfcase and cfdefaultcase. Evaluates a passed expression and passes control to the cfcase tag that matches the expression result. You can optionally code a cfdefaultcase tag, which receives control if there is no matching cfcase tag value.
T
<cftable> Builds a table in a CFML page. Use the cfcol tag to define table column and row characteristics. The cftable tag renders data either as preformatted text, or, with the HTMLTable attribute, as an HTML table. Use cftable to create tables if you don't want to write HTML table tag code, or if your data can be well presented as preformatted text
<cftextarea> The ` ` tag is not supported by Lucee.
<cfthread> The cfthread tag enables you to create threads, independent streams of code execution, in your application.
<cfthrow> The cfthrow tag raises a developer-specified exception
<cftimeout> Whilst similar to a <cfthread>, code run inside the <cftimeout> executes within the same scope as the current page
<cftimer> Displays execution time for a specified section of CFML code.
<cftooltip> The ` ` tag is not supported by Lucee.
<cftrace> Displays and logs debugging data about the state of an application at the time the cftrace tag executes.
<cftransaction> Groups multiple queries into a single unit. The cftransaction tag provides commit and rollback processing.
<cftree> The ` ` tag is not supported by Lucee.
<cftreeitem> The ` ` tag is not supported by Lucee.
<cftry> Used with one or more cfcatch tags, the cftry tag lets you catch and process exceptions in CFML pages.
U
<cfupdate> Updates existing records in data sources.
W
<cfwddx> Serializes and de-serializes CFML data structures to the XML-based WDDX format.
<cfwebsocket> The ` ` tag is not supported by Lucee.
<cfwhile> Simplification of the tag cfloop-condition, analog to the cfscript &quot;while&quot; loop.
<cfwindow> Creates a pop-up window in the browser. Does not create a separate browser pop-up instance.
X
<cfxml> Creates a CFML XML document object that contains the markup in the tag body. This tag can include XML and CFML tags. Lucee processes the CFML code in the tag body, then assigns the resulting text to an XML document object variable.
Z
<cfzip> Manipulates ZIP and Java Archive (JAR) files.
<cfzipparam> The cfzipparam tag is always a child tag of the cfzip tag. see tag zip for more details.
A
Application.cfc / <cfapplication> Defines a CFML Application and configures the properties / behavior of that Application