Skip to content

Controller

renderView()

renderView() — returns any

Available in: controller Category: Rendering Functions

Instructs the controller which view template and layout to render when it’s finished processing the action. Note that when passing values for controller and / or action, this function does not execute the actual action but rather just loads the corresponding view template.

NameTypeRequiredDefaultDescription
controllerstringno[runtime expression]Controller to include the view page for.
actionstringno[runtime expression]Action to include the view page for.
templatestringnoA specific template to render. Prefix with a leading slash (/) if you need to build a path from the root views folder.
layoutanynoThe layout to wrap the content in. Prefix with a leading slash (/) if you need to build a path from the root views folder. Pass false to not load a layout at all.
cacheanynoNumber of minutes to cache the content for.
returnAsstringnoSet to string to return the result instead of automatically sending it to the client.
hideDebugInformationbooleannofalseSet to true to hide the debug information at the end of the output. This is useful, for example, when you’re testing XML output in an environment where the global setting for showDebugInformation is true.
statusstringno[runtime expression]Force request to return with specific HTTP status code.