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

 

insite:calltemplate

Defines an editable slot.

Syntax

Parameters

site (required)
The name of the site containing the Template to be invoked

slotname (required)
This attribute defines an identifier for the "slot" that is being filled with the called template. It should be reasonably easy to understand for humans and should be unique across all templates.

tid (required)
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 should be the id of the CSElement, and ttype should be set to CSElement.

ttype (optional)
This attribute identifies whether the code that contains this tag is a Template or a CSElement. The default value is Template, and CSElement is the other legal value. See tid.

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.

context (optional)
This attribute contains a context override parameter. If no value is specified, Content Server 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 to element 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 is element, 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 to embedded, the nested template is invoked as a pagelet without using Satellite Server. This causes the pagelet to be independently rendered (and possibly cached) by Content Server 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 to element 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.

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 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 >

FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.