Home > Contents > 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 destination 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
orname
must be supplied to identify the asset.
OBJECTID (required if name is not used)
- Input. Asset id of the asset. Either
type+objectid
orname
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 if there is any data in the AssetDefaultTemplate table (configured by using the
Admin/Publishing/[publish destination]/SetDefaultTemplate
function) for the asset type/subtype combination. If there is no data, the tag gets the template from the asset. If there is no template from the asset, it returns the system default template (OpenMarket/DefaultTemplate
). This tag returns the template name that 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 asset.
<ASSET.LOAD NAME="anAsset" TYPE="Variables.assettype" OBJECTID="Variables.assetid"/> <if COND="IsError.Variables.errno=false"> <then> <ASSET.GetTemplateForTarget NAME="anAsset" TARGET="Variables.target" OUTPUT="defTemplate"/> <STRING.STREAM VARIABLE="defTemplate"/> </then> </if>This example gets the template name for a Products asset without loading the asset.
<ASSET.GetTemplateForTarget TYPE="Products" OBJECTID="Variables.assetid" SUBTYPE="Lighting" TARGET="Variables.target" OUTPUT="defTemplate" /> <STRING.STREAM VARIABLE="defTemplate"/>See Also
ASSET.GET
ASSET.GETSUBTYPE
ASSET.GETTEMPLATEPAGENAME
ASSET.GETTEMPLATEROOTELEMENT
ASSET.SCATTER
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.