Template viewer

The template viewer is a portlet that runs a script or template, and renders the output as part of the enclosing page.

Properties

This section describes the properties of a Template viewer portlet, as shown on the corresponding Edit pane.

Property Description
Title

Type a title for this portlet. The title is never rendered at runtime, but is used to identify the portlet in the Development Studio.

Parameter name

If you want conditional execution, you can type the name of parameter which must be passed to the page (either by GET or POST) in order to execute the portlet. Note that this applies only when the implementation type is “Traditional HTML”; for other types, use the capabilities of the templating language.

Parameter value

If you want the portlet to execute only when the parameter identified by Parameter name has a certain value, enter the value.

Template set

Please see Template Set in the DevelopmentReference for more information.

For the implementation type “Traditional HTML”, you can use hash-based substitution tags. This table lists available tags.

Property Description
#REFERENCE_PATH#

Identifier for the portlet instance.

#PAGE_URL#

Identifier for the page URL.

#PARAM#

Tag to read parameters from the page; parameters from the URL, or which are sent to the page via a GET or a POST).

The following formats are supported:

  • #PARAM: <parameter name>#
  • #PARAM: <parameter name>: <parameter ref>: <parameter name>#

Examples:

#PARAM:p_test# - this will retrieve the value from the parameter p_test from the URL.

#PARAM:p_test:order:p_test# - this will first look for the parameter p_test sent as part of a form named order (POST), if this doesn’t exist it will retrieve the value from the parameter p_test from the URL (GET).