You are viewing documentation for v1.0.x. Change

renderPartial()

Description

Renders content to the browser by including a partial.

Function Syntax

renderPartial(partial [, cache, layout, returnAs ])

Parameters

Parameter Type Required Default Description
partial string Yes The name of the file to be used (starting with an optional path and with the underscore and file extension excluded).
cache any No Minutes to cache the content for.
layout string No The layout to wrap the content in.
returnAs string No Set to string to return the result to the controller instead of sending it to the browser immediately.

Examples

<!--- Render the partial `_comment.cfm` located in the current controller's view folder --->
<cfset renderPartial("comment")>