render

Executes CFML/Lucee code that you provide as a string.

render(CFML[, dialect ]) → returns void

Member Function Syntax

This function requires Lucee 5 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

CFML string
Required

String to evaluate including some CFML/Lucee code
Values:

dialect string
Default: current template's dialect

The dialect you want details for
Values:
  • CFML
  • Lucee

Examples
Sample code invoking the render function

Description of the code example

str = 'hello world';
savecontent variable="changed"{
render("#replace(str,'world','universe')#!");
}
writeOutput(str);
writeOutput(changed);

Expected Result: hello worldhello universe!

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub