renderAsset()
Overview
public string function renderAsset(
required string assetId
, string context = "default"
, struct args = {}
)
Renders a given asset in an optional context. See Working with the asset manager for more detailed documentation on working with assets.
Arguments
Name | Type | Required | Description |
---|---|---|---|
assetId | string | Yes | The ID of the asset record to render |
context | string | No (default="default") | The context in which the asset should be rendered. This will inform the choice of viewlet used to render the asset. |
args | struct | No (default={}) | Arbitrary args struct to be passed to the viewlet that will render this asset |