Display content, stored in the GenticsContentRepository, published by Gentics Content.Node. Supports dynamic lists and some user interaction.
Contents based on templates of type CSS, JS or XML are rendered fullscreen automatically.
Table 5.4. Portlet parameters for GenticsContentModule
Name | Type | Default | Description |
---|---|---|---|
contentid | String | (either contentid or filename required) | Id of the content to initially load. |
filename | String | (either contentid or filename required) | Filename of the content to load initially (if no contentid is set) |
pub_dir | String | / | Publish directory of the content to load initially (if a filename, but no contentid is set) |
node_id | Integer | NULL | Id of the node, from which the initial content shall be taken (if a filename, but no contentid is set). The default value NULL means that the node_id is not used to find the content. |
datasource | String | (required) | Id of the datasource to use, must be of type Gentics .Node ContentRepository. |
rule | String | true | Rule to determine whether the content can be viewed or not. Is also derived to plist items. |
maxwidthname | String | maxwidth | Name of the parameter passed to the module to spezify the width of the resized image( |
maxheightname | String | maxheight | Name of the parameter passed to the module to spezify the height of the resized image |
imagetypename | String | auto | Name of the parameter passed to the module to spezify the image type. |
maxallowedwidth | Integer | 16384 | Maximal allowed with in pixel for resizing images. Maximal allowed width. |
maxallowedheight | Integer | 16384 | Maximal allowed height in pixel for resizing images. Maximal allowed height. |
templateEngine | Boolean | false | whether to use TemplateEngine2 |
editPage | String | The ML code to use for developer's editmode. | |
template_noperm | String | The ML code to use if a requested page was forbidden by rule. | |
prefixstaticurls | String | By setting this parameter all static URLs made from PLinks to files or images contained in the contentrepository will be prefixed with the string provided. | |
ruleactions | Node |
<actions> node to define pluggable
actions that determine whether the user has
permission to render the current content.
There must exist at least one action with id
| |
languagemanagement | Boolean | false | With this setting, the language management for the GenticsContentModule can be switched on. See “Language Management” (Section 4.10) for details. |
language | String |
Current content language, when
| |
languagefallback | List of Strings |
Space separated list of language codes to be
used for language fallback, when
| |
pathlinks | Boolean | false |
When this parameter is set to
For this feature to work correctly, it is necessary, that the pathinformation (pub_dir, filename, node_id) is really published to the content repository. |
nodeidinpathlinks | Boolean | true |
This parameter is only interpreted, when the
parameter
|
contentChangeChecking | Boolean | false | Flag to switch on/off automatic checking for content changes. When switched on, the shown content is frequently checked for changes and refreshed, if necessary. |
contentChangeCheckingInterval | Integer | 60 | Interval in seconds, in which the shown content is checked for modifications, when the parameter contentChangeChecking is true . |
secret | String | By setting a secret, the Image Resize Validation is switched on. See “Image Resize Validation” (Section 16) for details. |
Table 5.5. Portlet Properties for GenticsContentModule
Variable | Type | Description |
---|---|---|
forbidden | Boolean | Whether the content was forbidden by the rule parameter. |
renderedcontent | String | The currently rendered content. |
contentid | String | The currently rendered contentid |
* | String | All other content properties in the ContentRepository, as defined in Gentics Content.Node's tagmap. |
Table 5.6. Events of the GenticsContentModule
Name | Description | Event properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
onSelect | This event is triggered every time a contentlink is requested. |
| ||||||||||
onContentNotFound |
This event is triggered in one of the following cases:
|
|
This portlet renders <plink>s either because it is configured as “PLink Processor” (Section 8.2.9) or automatically for <plink>s contained in the rendered content.
When a user clicks the <plink>, an onSelect
event is thrown for the plink processing portlet. Any further activity (e.g. rendering the target content) has to be implemented as reaction to this onSelect
event. For details on reactions, see Section 11.1.3, “PNodes”.
The <plink>s rendered in the content shown in the
GenticsContentModule will automatically be XML escaped,
when the
mimetype
of the content is either
text/html
or
text/xml
. For all other
mimetype
s (e.g.
text/js
or
text/css
), the <plink>s will NOT be XML escaped.
XML escaped URLs with have the characters
&
,
<
,
>
,
'
and
"
be replaced by their entities
&
,
<
,
>
,
'
and
"
respectively.
![]() | Note |
---|---|
Note that just by placing <plink>s and configuring a “PLink Processor” (Section 8.2.9), this processor will NOT automatically display the pages linked to by clicked <plink>s. You will always need a reaction that forces the clicked page to be displayed. |
Images can also be dislplayed by this portlet. Whenever an image is to be processed it is possible to resize to image to a custom size as followd (if parameternames are default). If one of the parameters of height or width is not spezified the image is processed proportional.
<plink id="10008.12345">&p.maxwidth=500&p.maxheight=200&p.imagetype=png
Resized images are chached using the portal's internal cache (see Section 10, “Cache”).
This module offers custom actions to enable interaction between the user and the portal through links. Similar to plinks, paction placeholders in the content are transformed to dynamic portallinks:
<a href="<paction [customactionvalue]>">Click this action!</a>
The customaction is stored into the portal after the click and can be used in the whole portal through the moduleproperty "customaction" until it is changed or the portalsession is ended. A customaction can be also generated manually for POSTs:
<form method="POST"> <input type=hidden name="am" value="PCP"> <input type=hidden name="p.action" value="custom"> <select name="p.customaction"> <option value="[customactionvalue]"> </select> <input type="submit"> </form>
Plists are used to display dynmic content lists.
Example 5.2. Syntax Plists
<plist id="..."> <pagelinkunselected></pagelinkunselected> <pagelinkselected></pagelinkselected> <pagelinkseperator></pagelinkseperator> <listtemplate></listtemplate> <pagesize></pagesize> <start></start> <limit></limit> <pagebarleftsize></pagebarleftsize> <pagebarrightsize></pagebarrightsize> <pagelinkellipsis></pagelinkellipsis> <showfirstpage> </showfirstpage> <showlastpage> </showlastpage> <sortby> </sortby> <sortorder> </sortorder> <emptyresult></emptyresult> <filterrule></filterrule> <template></template> </plist>
Table 5.7. Settings Plists
Name | Type | Default | Description |
---|---|---|---|
id | String | Id of the plist, must be unique in the scope of the content, required for usage of paging | |
pagelinkunselected | String | Template of the page link for unselected pages. Supports variables of the pagelink template (see below) | |
pagelinkselected | String | Template of the page link for the selected page. Supports variables of the pagelink template (see below) | |
pagelinkseperator | String | Template for the separator between pagelinks to neighbouring pages | |
listtemplate | String | Template for the list, when paging is active. Supports variables <insert plist> and <insert pagebar> (see below) | |
pagesize | Integer | number of elements shown on each page, optional (defaults to "no paging") | |
start | Integer | Number of the first shown element, optional (defaults to 0) | |
limit | Integer | Maximum number of elements shown in the plist | |
pagebarleftsize | Integer | maximum number of pagelinks shown to the left of the selected page (excluding the first page). Optional, defaults to -1 (all pages shown) | |
pagebarrightsize | Integer | maximum number of pagelinks shown to the right of the selected page (excluding the last page). Optional, defaults to -1 (all pages shown) | |
pagelinkellipsis | String | String to be shown when pagelinks are omitted due to pagebar limitations. Optional, defaults to " … " | |
showfirstpage | Boolean | Flag, whether the link to the first page is always shown. Optional, defaults to true. | |
showlastpage | Boolean | Flag, whether the link to the last page is always shown. Optional, defaults to true. | |
sortby | String | Attribute name for sorting of elements | |
sortorder | String | Sortorder (asc or desc) | |
emptyresult | String | String to be shown when no elements found. Optional, defaults to empty string | |
filterrule | String | Rule for filtering the elements shown in the plist | |
template | String | Template for display of one element (row) in the plist. Supports <insertlist>s shown below. All attributes of the shown contentobject can be accessed by <insert> |
Table 5.8. Template Variables for Rowtemplate
Name | Type | Description |
---|---|---|
nr | Integer | Number of the element on the page, starting with 1 |
The Rowtemplate variables are provided through <insertlist *> tags, in the template parameter.
Table 5.9. Template Variables for Listtemplate
Name | Type | Description |
---|---|---|
plist | String | filled with the plist (exclusive paging) |
pagebar | String | filled with the pagebar |
The Listtemplate variables are provided through <insert *> tags, in the listtemplate parameter.
Table 5.10. Template Variables for Pagelink
Name | Type | Description |
---|---|---|
start | Integer | Number of the first element shown on this page |
end | Integer | Number of the last element shown on this page |
page | Integer | Number of thuis page |
pageurl | String | url to switch onto this page |
The Pagelink variables are provided through <insert *> tags, in the pagelinkunselected and pagelinkselected parameter.
The optional language management can be used to automatically display the selected content in the clients language, when available. It also supports fallback to other languages in a specified order.
The language management can be switched on by setting
the pnode parameter
languagemanagement
. When it is switched on and the
GenticsContentModule
should render a page, it tries to find a better suitable
one by following this algorithm:
Determine the desired content language (by
reading the pnode parameter
language
).
Get the attribute
contentid_[languagecode]
(where [languagecode] is the desired
language) from the content object that shall
be rendered. When the attribute links to the
content object in the desired language,
render that object and finish.
When the content object was not found in the
desired language, do the step above with the
languages optionally defined in the pnode
parameter
languagefallback
and render the content in the first language found.
When the content was not found in any of the specified languages, simply render the given content object, no matter what language it is in.
The language of the GenticsContentModule can be set to the current portal language by configuring the pnode-parameter like this:
<pnode ...> <parameters> <parameter name="language"><pobject>portal.language.id</pobject></parameter> ... </parameters> </pnode>