renderView()
Overview
public any function renderView(
required string presideObject
, required string view
, boolean autoGroupBy = true
, string returntype = "string"
, struct args
, boolean cache = false
, boolean cacheAutoKey = true
, any cacheTimeout = ""
, any cacheLastAccessTimeout = ""
, string cacheSuffix = ""
, string cacheProvider = "template"
)
Renders a view using data from the Preside Object layer. See presidedataobjectviews for a full guide.
Info
The method will accept any extra arguments not defined here and use them in its call to selectData(). Any arguments valid for the selectData() method are valid here.
Arguments
Name | Type | Required | Description |
---|---|---|---|
presideObject | string | Yes | The name of the object from which to select data for the view |
view | string | Yes | The view path (a regular coldbox view path) |
autoGroupBy | boolean | No (default=true) | |
returntype | string | No (default="string") | Either "struct" or "string". If "struct", the method will return additional information about the recordset used to render the view. If "String", just the rendered view will be returned. |
args | struct | No | A data struct that will be passed to the view |
cache | boolean | No (default=false) | Whether or not to cache the result |
cacheAutoKey | boolean | No (default=true) | When caching, whether or not to automatically generate a suitable cache key that attempts to be invalidated when the source data changes. |
cacheTimeout | any | No (default="") | Optional numeric cache timeout. See [Cachebox documentation](https://www.gitbook.com/book/ortus/cachebox-documentation/details) for more details on cache timeouts, etc. |
cacheLastAccessTimeout | any | No (default="") | Optional numeric cache last access timeout. See [Cachebox documentation](https://www.gitbook.com/book/ortus/cachebox-documentation/details) for more details on cache timeouts, etc. |
cacheSuffix | string | No (default="") | Optional manual cache key suffix. This is an alternative to using the 'cacheAutoKey' argument. If using this argument, ensure unique cache suffixes for distinct calls to this method. |
cacheProvider | string | No (default="template") | Optional specific alternative cache provider in which to store the cached view. Defaults to the standard ColdBox "template" cache. Optional numeric cache timeout. See [Cachebox documentation](https://www.gitbook.com/book/ortus/cachebox-documentation/details) for more details on cache providers, etc. |