This section describes the configuration of the portlet entities, when portal pages are used.
Portlet entities define "instances" of portlets and their
defining parameters. Every portlet entity is identified by
its unique
id
and refers to a portlet (definition) via the
type
. Note that it is possible to define multiple - differently
configured - entities of the same portlet. Portlet entities
are also called "modules".
Example 3.25. Structure of the portlet entities configuration file
<?xml version="1.0" encoding="UTF-8"?> <portlet-entities xmlns="http://www.gentics.com/xml/ns/portal/portletentities"> <reactions> <reaction event="..."> ... </reaction> ... </reactions> <defaultactions> <action name="..." [deprecated alternative: type="..."]> <properties> <property id="...">...</property> </properties> </action> </defaultactions> <pnodes> <pnode id="..." type="..."> <reactions> <reaction event="..."> ... </reaction> ... </reactions> <actions> <action name="..."> <visible> true|false|[<prule>...</prule>]|[<pobject>...</pbobejct>] </visible> <properties> <property id="...">...</property> </properties> </action> </actions> <style>...</style> <windowstate>...</windowstate> <isvisible> true|false|[<prule>...</prule>]|[<pobject>...</pbobejct>] </isvisible> <title> [cdata]|[<prule>...</prule>]|[<pobject>...</pbobejct>] </title> <titleaction>...</titleaction> <parameters> <parameter name="...">...</parameter> ... </parameters> <templates> <template id="..." loader="..."> <classes> <class id="...">...</class> ... </classes> <source>...</source> <parameters> <parameter id="...">...</parameter> </parameters> </template> ... </templates> </pnode> ... </pnodes> </portlet-entities>
Table 3.60. Portlet Entities Configuration Attributes
Name | Type | Default | Description |
---|---|---|---|
portlet-entities | Container | NULL | Container node for all defined portlet entities (pnodes) and general event reactions. |
reactions | Container | NULL | Container node for the general event reactions. |
reaction | Object | NULL |
A single (general) event reaction.
The content of this node defines the
command that has to be invoked as
reaction to the specified event. The
command has to be an assignment,
formatted as described in
“Assignments” (Section 10.2.2)
. Note that multiple assignments can
be grouped with the functions
|
reaction.event | String | [required] | The event, that has to be triggered to invoke this reaction |
defaultactions | Container | NULL | Allows configuration of default settings (properties) for actions. |
defaultactions.action | Object | NULL | Definition of an action. |
defaultactions.action.name | String | [required] | Defines the name of the action under which it will be referenced. |
defaultactions.action.type (DEPRECATED) | String | NULL | Attribute which is equal to 'name'. Only available for backward compatibility. Do NOT use this attribute. |
defaultactions.action.icon (DEPRECATED) | String | NULL | Element available for backward compatibility only (Use properties instead!). Can be accessed in templates through $action.icon |
defaultactions.action.alt (DEPRECATED) | String | NULL | Element available for backward compatibility only (Use properties instead!). Can be accessed in templates through $action.alt |
defaultactions.action.properties | Collection | NULL | Allows configuration of properties which are available in templates as $action.properties.[property id] |
pnodes | Container | NULL | Container node for all pnodes. Every pnode defines a single portlet entity. |
pnode | Object | NULL | Definition of a single portlet entity. |
pnode.id | String | [required] |
Unique identifier of the portlet entity.
Often also referred to as
moduleid
.
|
pnode.type | String | [required] |
Type of the portlet entity. Generally,
the type must be in the form
[application-context-path]
/
[portlet-id]
.
|
pnode.reactions | Container | NULL | Container node for the entity specific event reactions. The definition of entity specific event reactions is identical to the definition of global event reactions (see above). |
pnode.actions | Container | NULL |
Container node for definition of
portlet actions for this portlet
entity. Normally, the portlet
actions are rendered in the portlet
frame. The default portlet actions
are: one for each portlet mode
supported by the portlet and one for
each of the following windowstates:
With this container, the default portlet actions can be modified: actions can be made invisible or new custom actions can be added. |
action | Object | NULL | Definition of a single portlet action |
action.name | String | [required] |
Name of the action. May be one of the default actions or any other name for a custom action.
Custom actions will trigger the
event
|
action.visible | Boolean, prule or pobject | true | Defines whether the action is visible in the portlet frame or not. |
action.properties | Collection | NULL | Allows overwriting of properties defined in the defaultactions node. Available in templates as $action.properties.[property id] |
style | String | NULL | Style definition of the portlet entity. Style definitions can be used to group portlet entities together in terms of layout. The style definition can be used to classify portlet frame templates, such that all portlets with the same style will be rendered using the same portlet frame templates. See “Portlet Frame Templates” (Section 14.2) for details. |
windowstate | String | normal | Default windowstate for the portlet entity. This setting can be overwritten with the windowstate setting when placing the portlet entity in a portal page position. |
isvisible | Boolean, prule or pobject | TRUE | Setting for the "visibility" of portlets (e.g. depending in user permission settings) |
title | String or pobject | [title rendered by the portlet] | Title of the portlet entity |
titleaction | String | NULL | Name of the action that shall be linked to the rendered portlet entity title. |
parameters | Container | NULL | Container node for the definition parameters of the portlet entity. The definition parameters (also called pnode parameters) define the general behaviour of the portlet entity. The set of possible parameter names is defined by the portlet implementation. |
parameter | Object | NULL |
Definition of a single parameter. The
parameter value can either be given as
content (String) or as embedded
<pobject>
.
|
parameter.name | String | [required] | Name of the parameter. |
templates | Container | NULL |
Container node for portlet entity templates (or pnode templates). Templates defined for a specific portlet entity always take precedence over any other (matching) template. See “Template definitions” (Section 8.7.4) for details on template definitions. |
![]() | Note |
---|---|
The namespace of the portletentities configuration elements must be
When other xml structures are included (e.g. as value of a pnode parameter), it is important to set the correct namespace of the embedded xml structure.
For example: The GenticsContentModule has a pnode parameter <pnode type="GenticsContentModule" id=".."> <parameters> <parameter name="ruleactions"> <actions xmlns=""> ... </actions> </parameter> </parameters> </pnode>
|
Frame Actions represent user interaction elements which can be used to change the state of the current portlet window.
The default actions which are displayed for all portlets are (Portlet mode actions will only be displayed if the portlet supports the given portlet mode):
By default these actions can be iterated in the portlet frame templates (see Section 14.2, “Portlet Frame Templates” for details). To give template writers more flexibility it is possible to attach properties to actions. These can be configured in the portlet entities configuration file, either within <defaultactions> or overloaded in the given pnode.
![]() | Note |
---|---|
Only the actions listed above will be visible for all portlets. If you configure a new (custom) action it has to be explicitly set to visible for every pnode where it should be displayed. |
Title actions are usually displayed as links of the portlet title. They can be configured using the <titleaction> tag within pnodes. Titleactions can either be one of the predefined actions or a custom action. They will always be available within the template, no matter if the action referred by the titleaction is set to visible or not.