You are on page 1of 3

4/16/23, 10:16 PM Core CFML Language :: Lucee Documentation


(/index.html)
Core CFML Language

Docs (https://docs.lucee.org/index.html)
 Categories (https://docs.lucee.org/categories.html)
 Core CFML Language (https://docs.lucee.org/categories/core.html)

 (https://github.com/lucee/lucee-
docs/edit/master/docs/05.categories/052.core/category.md)
The core elements of the CFML Language.

CFML started as a tag based language and then introduced <cfscript>


(/reference/tags/script.html).

So keep in mind, all these tags, i.e <cfif> (/reference/tags/if.html) can be also used in <cfscript>
(/reference/tags/script.html), which is similar to JavaScript.

// tag
<cfif redirect>
<cflocation url="https://www.lucee.org">
</cfif>
// cfscript
if (redirect)
location url="https://www.lucee.org";
// or
location(url="https://www.lucee.org");
}
// tags
<cfloop from=1 to=10 item="i">
<cfoutput>#i#</cfoutput>
</cfloop>
// cfscript
loop from=1 to=10 item="i" {
echo(i);
}

Functions
CreateObject() (/reference/functions/createobject.html) The CreateObject function takes
different arguments depending on the value of the first argument:
GetCurrentTemplatePath() (/reference/functions/getcurrenttemplatepath.html) Gets the
absolute path of the page that calls this function.
Len() (/reference/functions/len.html) Determines the length of a string, array or struct

https://docs.lucee.org/categories/core.html 1/3
4/16/23, 10:16 PM Core CFML Language :: Lucee Documentation

Guides 
(/index.html)
Lucee Language and Syntax Differences (/guides/developing-with-lucee-server/language-
syntax-differences.html) ## Architecture ## Adobe ColdFusion (ACF) is configured in a way
that only one single web context is available for a server instance. This means that if you do
not secure your single applications they might become vulnerable, you will have to use
sandbox security, single instances, etc. This and the fact that you do not have the ability to
configure individual CF settings for each virtual host are the major disadvantages of this setup
Operators (/guides/developing-with-lucee-server/operators.html) Mathematical, Logical,
Ternary, Comparison, String and Elvis Operators
Reserved Words (/guides/developing-with-lucee-server/reserved-word.html) The only reserved
words in Lucee are null, true and false. scope names
Scopes (/guides/developing-with-lucee-server/scope.html) local, arguments, query, variables,
this, cgi, cffile, url, form, cookie, client, thread, caller, request

Tags
<cfabort> (/reference/tags/abort.html) 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.
<cfcatch> (/reference/tags/catch.html) Used only inside a cftry, the cfcatch tag catches and
process exceptions.
<cfcomponent> (/reference/tags/component.html) Creates and defines a component object
<cfcontent> (/reference/tags/content.html) Defines the MIME type returned by the current
page. Optionally, lets you specify the name of a file to be returned with the page.
<cfdirectory> (/reference/tags/directory.html) Handles interactions with directories.
<cfdump> (/reference/tags/dump.html) 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.
<cfelse> (/reference/tags/else.html) 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> (/reference/tags/elseif.html) 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.
<cfexecute> (/reference/tags/execute.html) Enables developers to execute a process on a
server computer.
<cffile> (/reference/tags/file.html) Handles all interactions with files
<cffunction> (/reference/tags/function.html) Defines a function that can accept arguments
and return a value.
<cfheader> (/reference/tags/header.html) Generates custom HTTP response headers to return
to the client.
<cfhttp> (/reference/tags/http.html) Lets you execute HTTP POST and GET operations on files.

https://docs.lucee.org/categories/core.html 2/3
4/16/23, 10:16 PM Core CFML Language :: Lucee Documentation

<cfif> (/reference/tags/if.html) 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.
(/index.html)
<cfinclude> (/reference/tags/include.html) Lets you embed references to pages in CFML. You
can embed cfinclude tags recursively. For an additional method of encapsulating CFML
<cflocation> (/reference/tags/location.html) Redirect the current request to another URL.
<cflock> (/reference/tags/lock.html) Provides two types of locks to ensure the integrity of
shared data: Exclusive lock and Read-only lock.
<cfloop> (/reference/tags/loop.html) 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.
<cfmail> (/reference/tags/mail.html) Sends e-mail messages by an SMTP server.
<cfmodule> (/reference/tags/module.html) 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..
<cfoutput> (/reference/tags/output.html) Displays the results of a database query or other
operation. To nest cfoutput tags, see the &quot;Usage&quot; section.
<cfparam> (/reference/tags/param.html) Tests for a parameter's existence, tests its data type,
and provides a default value if one is not assigned.
<cfquery> (/reference/tags/query.html) Passes SQL statements to a data source. Not limited
to queries.
<cfreturn> (/reference/tags/return.html) Returns result values from a component method.
Contains an expression returned as result of the function.
<cfsavecontent> (/reference/tags/savecontent.html) Saves the generated content inside the
tag body in a variable.
<cfscript> (/reference/tags/script.html) Encloses a code segment containing cfscript.
<cfset> (/reference/tags/set.html) Define a CFML variable. If the variable exists, cfset resets it
to the specified value.
<cfswitch> (/reference/tags/switch.html) 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.
<cftry> (/reference/tags/try.html) Used with one or more cfcatch tags, the cftry tag lets you
catch and process exceptions in CFML pages.
Application.cfc / <cfapplication> (/reference/tags/application.html) Defines a CFML
Application and configures the properties / behavior of that Application
The Lucee Documentation is developed and maintained by the Lucee Association Switzerland
and is licensed under a (http://creativecommons.org/licenses/by-nc-sa/3.0/)
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
(http://creativecommons.org/licenses/by-nc-sa/3.0/).

https://docs.lucee.org/categories/core.html 3/3

You might also like