Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 



Looks up a map value for a given Template or CSElement.


        KEY="name of lookup key" 
        VARNAME="output variable name" 
        SITE="site name" 
       [TID="id of template or cselement"]


key (required)
The name of the key corresponding to the value. The key is the only thing that can be hard-coded in a template; hard-coding asset names, types, or values is discouraged.
varname (required)
The output variable name to contain the value corresponding to the key.
site (required)
The name of the site corresponding to this mapping. (mapped values differ across sites).
tid (optional)
The id of the template that owns the mapping (defaults to the id of the current template). If this tag is present in a CSElement, then the default is the CSElement id, and ttype must be set to CSElement.
ttype (optional)
CSElement or Template, depending on whether you are trying to look up the mapping for a Template or a CSElement. The default value is Template
match (optional)
The match attribute corresponds to the portion of the value to return. It is a filtering parameter. Map values have several forms, depending on the type of parameter being looked up. If the key is of the form asset type : asset name and match is set to :x then the asset name will be returned. The table below describes the map forms.
Map value forms
Map entry type Map form
asset name asset type : asset name
asset id asset type : asset id
asset type asset type
template name template name


This tag looks up a map value and returns it, filtered based on the match attribute's pattern.

Templates and CSElements contain execution logic, such as JSP or XML code. If asset names, ids, or even types are hard-coded in the Template or CSElement logic, then if the referenced asset is replicated, the template may no longer refer to the replicated asset correctly (the asset id may change). For this reason, Templates and CSElements support mapped variables. Mapped variables contain a key and a value, and are "attached" to a template instance and a site. In a mapped variable, the actual asset information (name, type, id, etc.) is recorded as a map value, and it is assigned an arbitrary key by the template developer. The key is then used in the template logic to look up the value, so that the value is always retrieved dynamically.

Map data is therefore as important to a template as the code itself.

This tag allows map values to be retrieved for the specified template.

Error Numbers

The possible values of errno include:

A required parameter is missing.


The following example is in JSP but the XML syntax is analogous. Assume a template name is FSIILayout, and the site containing this template has a site prefix of FSII. If that site is replicated, then the FSIILayout template name will be copied, and the copy will have a template name of NewLayout (assuming the new site's prefix is New). Referring to this template by name would result in a failure when the template is executed. Instead, the template name is looked up:

<%-- Look up the name of the layout template --%>

<%-- Look up the name of the wrapper page's site entry.  
     Note we want the asset name only, so we must specify
     the match filter. --%>

See Also


  Home > Contents > Index >

Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.