Home > Contents > Index >
ASSET.GETTEMPLATEROOTELEMENT
Calculates the name of an asset's template and gets that template asset's root element, without loading the template.
Syntax
<ASSET.GETTEMPLATEROOTELEMENTNAME="asset instance object"
[TYPE="asset type"]
[TEMPLATE="template name"]
OUTPUT="variable name" />
Parameters
NAME (required unless TYPE and TEMPLATE parameters used)
- Name of the asset instance object.
TYPE (optional unless TEMPLATE parameter used)
- Asset type of the asset.
TEMPLATE (optional)
- Name of the template. If none is provided, the template name is retrieved from the loaded asset instance.
OUTPUT (required)
- Variable in which to store the root element of the calculated template.
Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing. -10005 The requested object is not in the object pool (is not loaded intomemory). -12004 An asset was not found for a specified ID. -12006 There is no such asset type.Example
This example gets the template rootelement into a Sites variable named "render:element" from a loaded asset.<ASSET.LOAD NAME="anAsset" TYPE="Variables.assettype" OBJECTID="Variables.assetid"/> <if COND="IsError.Variables.errno=false"> <then> <ASSET.GETTEMPLATEROOTELEMENT NAME="anAsset" OUTPUT="render:element"/> </then> </if>This example gets the template rootelement into a Sites variable named "render:element" without loading the asset.<ASSET.LIST LIST="theasset" TYPE="Variables.assettype" FIELD1="id" VALUE1="Variables.assetid"/> <if COND="IsError.Variables.errno=false"> <then> <ASSET.GETTEMPLATEROOTELEMENT TEMPLATE="theasset.template" TYPE="Variables.assettype" OUTPUT="render:element"/> </then> </if>See Also
ASSET.GETTEMPLATEFORTARGET
ASSET.GETTEMPLATEPAGENAME
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.