Posts Tagged ‘render:lookup’


The render:lookup tag is one of the important tag, which is used in looking up a  map value for a given Template or CSElement. We will now see the syntax of this tag, and its usage.


This render:calltemplate tag is used to Look up a map value for a given Template or CSElement.


The following is the JSP syntax of the render:calltemplate tag. This is in reference with the “Tag Reference” guide.

        key="name of lookup key"
        varname="output variable name"
        site="site name"
       [tid="id of template or cselement"]

We will now discuss the some important arguments which are specified above.

1. Key:  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.

2. Varname: The output variable name to contain the value corresponding to the key.

3. Site: The name of the site corresponding to this mapping. (mapped values differ across sites).

4. Tid: 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.

Example usage of render:callelement:
<%-- 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. --%>