Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
asset:gettemplatefortarget
Returns a template name in the designated variable.
Syntax
<asset:gettemplatefortarget name="asset object name" [type="assettype"] [objectid="assetid"] [subtype"asset subtype"] target="publish id" output="variable name" />Parameters
name (required unless type and objectid supplied)
- Name of the asset object.
type (required if name is not used)
- Input. Asset type of the asset. Either
type+objectid
or name must be supplied to identify the asset.
objectid (required if name is not used)
- Input. Asset id of the asset. Either
type+objectid
or name must be supplied to identify the asset.
subtype (optional)
- Input. Subtype of the asset. If
type+objectid
is used, thesubtype
parameter is used to look up the appropriate template name in theAssetDefaultTemplate
table.
target (required)
- ID of the Publish target.
output (required)
- Name of the output variable to create.
Description
This tag checks to see if there is a default template in the
AssetDefaultTemplate
table (configured by using theAdmin/Publishing/[Publish Destination]/SetDefaultTemplate
function) for the asset type /subtype combination. If there is no default template, the tag gets the template from the asset. If the asset has no assigned template, it returns the system default template (OpenMarket/DefaultTemplate
). This tag displays the template which is used when approving the asset for export.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).Example
This example gets the template name for a particular Article.
<asset:load name="myArticle" objectid="123456789012"/> <asset:gettemplatefortarget name="myArticle" target="98765432101" output="templatename"/>This example gets the template name for a particular Products without loading the asset.
<asset:gettemplatefortarget type="Products" objectid='<%=ics.GetVar("assetid")%>' subtype="Lighting" target="98765432101" output="templatename"/>See Also
asset:get
asset:getsubtype
asset:gettemplatepagename
asset:gettemplaterootelement
asset:scatter
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.