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

NameTypeRequiredDescription
presideObjectstringYesThe name of the object from which to select data for the view
viewstringYesThe view path (a regular coldbox view path)
autoGroupBybooleanNo (default=true)
returntypestringNo (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.
argsstructNoA data struct that will be passed to the view
cachebooleanNo (default=false)Whether or not to cache the result
cacheAutoKeybooleanNo (default=true)When caching, whether or not to automatically generate a suitable cache key that attempts to be invalidated when the source data changes.
cacheTimeoutanyNo (default="")Optional numeric cache timeout. See [Cachebox documentation](https://www.gitbook.com/book/ortus/cachebox-documentation/details) for more details on cache timeouts, etc.
cacheLastAccessTimeoutanyNo (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.
cacheSuffixstringNo (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.
cacheProviderstringNo (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.