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:gettemplaterootelement
name="asset instance object" [type="asset type"] [template="template name"] output="variable name" />Parameters
name (required unless type and template arguments provided)
- Name of the asset instance object.
type (optional unless template argument 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="Article" objectid='<%=ics.GetVar("assetid")%>' > <asset:gettemplaterootelement name="anAsset" output="render:element"/>This example gets the template rootelement into a Sites variable named "render:element" without loading the asset.<asset:list list="theasset" type='<%=ics.GetVar("assettype")%>' > <argument name="id" value='<%=ics.GetVar("assetid")%>' /> </asset:list> <asset:gettemplaterootelement template='<%=ics.GetList("theasset").getValue("template")%>' type='<%=ics.GetVar("assettype")%>' output="render:element"/>See Also
asset:gettemplatefortarget
asset:gettemplatepagename
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.