Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
insite:calltemplate
Defines an editable slot. The slot can be either enabled for:
- presentation-editing, if
slotname
if specifeid- content-editing, if
field
,assetid
andassettype
are specified- both, if
slotname
,field
,assetid
andassettype
are specifiedSyntax
<insite:calltemplate [c="asset type"] [cid="asset id"] [tname="target Template or CSElement name"] [slotname="name of slot"] [variant="regular expression"] [field="the name of the edited asset reference field"] [assetid="the id of the edited asset"] [assettype="the type of the edited asset"] [context="context override"] [style="pagelet|element|embedded"] [packedargs="packed arguments"]> [args="variable1,variable2,..."]> [site="site name"] [tid="caller Template or CSElement id"] [ttype="Template|CSElement"] [clegal="comma-separated list of allowed types and subtypes"] [cssstyle="CSS class name(s) to add to the slot"] [emptytext="Text displayed when the slot is empty"] [roles="List of roles allowed to edit this slot"] [title="overrides the default slot title"] [buttons="comma-separated list of buttons"] [index="for multivalued fields, index of the edited item"] [<insite:argument name="variable3" value="value3"/>] </insite:calltemplate>
Parameters
c (optional)
- The asset type to be rendered by the called Template. The value of this attribute will be passed to the called code. If
c, cid
are set, then slot data is ignored.
cid (optional)
- The id of the asset to be rendered by the called Template. The value of this attribute will be passed to the called code. This is required if
c
is set.
tname (optional)
- The name of the Template to be called. If this attribute is not set, the called template will be determined by looking at the slot data.
variant (optional)
- When presentation editing mode is enabled (i.e.
slotname
is set), this attribute allows to restrict which templates can be selected by editors.
slotname (optional)
- When specified, enables presentation-editing mode. This attribute defines an identifier for the "slot" that is being filled with the called template. It should be unique across all templates.
field (optional)
- Indicates which field of the asset specified by
assetid
andassettype
is edited when an asset is dropped in the slot. The field has to be an asset reference field i.e.:
- a flex attribute of type 'asset'
- an asset association. In this case, the expected syntax is
Association-named:nameOfAssociation
- a flex parent asset field. In this case, the expected syntax is
Group_nameOfParentDefinition
ManualRecs
, if the edited asset is a static recommendation
assetid (optional)
- When
field
is specified, indicates the id of the edited asset. By default, set the value of thecid
Sites attribute.
assettype (optional)
- When
field
is specified, indicates the type of the edited asset. By default, set the value of thec
Sites attribute.
site (optional)
- The name of the site containing the Template to be invoked. By default, Sites looks up the value of the
site
Sites variable.
tid (optional)
- The id of the template in which this tag is located. If this tag is located in a
CSElement
, then the value of this attribute is set to the id of theCSElement
, andttype
should be set toCSElement
.
ttype (optional)
- This attribute identifies whether the code that contains this tag is a
Template
or aCSElement
. The default value isTemplate
, andCSElement
is the other legal value. Seetid
.
context (optional)
- This attribute contains a context override parameter. If no value is specified, Sites uses a variable called "context", which is maintained automatically (see below for a detailed explanation).
style (optional)
- Flag that indicates that the called Template should be called as an element or as a pagelet, and if it is to be called as a pagelet, should it be embedded in the parent for Satellite Server or should it be an independent pagelet. The default value is
pagelet
. Setting this attribute value toelement
will result in the template being called as an element. This is useful if a nested pagelet is not necessary or desireable (i.e. would be overkill) for the target Template. When the style iselement
, the scope of the called element is local: only variables specified as arguments and attributes will be accessible to the called element, and variable values in the caller will not be affected. When the style is set toembedded
, the nested template is invoked as a pagelet without using Satellite Server. This causes the pagelet to be independently rendered (and possibly cached) by Sites but the result of the pagelet is embedded in the caller, just as if it had been called as an element. Satellite Server does not see embedded pagelets as separate from their caller; they are simply part of the output of the caller. Note that if this is set toelement or embedded
, then the invoked Template will be embedded in the caller, and this can have performance, dependency, and caching implications, which can be good or bad depending on your code).
packedargs (optional)
- This attribute contains a series of arguments (name-value pairs) URL-encoded as a string.
clegal (optional)
- A comma-separated list of asset types which are allowed to be dropped in this slot. Subtypes can be specified using the following syntax:
assetType:subtype
, orassetType:*
insite:argument (optional)
- Nested parameter tag. The insite:calltemplate tag allows arbitrary argument tags to be added in order to pass name/value pairs to the called Template or CSElement.
Description
This tag can replace render:calltemplate in order to allow content managers to fill in a slot using the Page Layout interface, by selecting an asset and/or a corresponding template.
By default, a slot is context-sensitive. Inside a pagelet, the context is determined by the asset being rendered, and the template used to render it (as a string of the form<c>:<cid>:<tname>
).
Note that nested pagelets append their context with the parent context, separated with a semi-colon.
If you want to change the default behavior, use the context attribute to override the default context value. For example, defining a slot in a template, and overriding the context to a constant value will force the slot to display the same content, regardless of the asset being rendered.
When insite editing is turned off, the tag behaves exactly like render:calltemplate.
Home > Contents > Index > Oracle JSP Tag Reference
Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.