Portal Property Paths can be used to access properties in areas like View definitions or Velocity template files.
The portal property is the root for all other properties. All other property root paths are only shortcuts which refer to an element within the portal.* tree.
Table 4.156. Portal Property Path
Name | Type | Description |
---|---|---|
portal.imps.* | List | List of all imps provided by the portal. See Chapter 3, Administration and Configuration and Section 1, “Imps” |
portal.i18n(String) | Method | used to display internationalized texts. syntax: $portal.i18n("welcome") |
portal.i18n(String, String) | Method | used to display internationalized texts in a given language. syntax: $portal.i18n("welcome", "de"). Only operable under templateengine2 but not in expressions. |
portal.user.* | Properties | The userproperties, as provided by the authmanager used. |
portal.user.userid | String | UserID of the current user. |
portal.user.isloggedin | Boolean | Whether the user is currently logged in. |
portal.user.[authenticationid].* | Properties | Properties of a primary or secondary AuthenticationManager may be accessed directly by specifying the according <authentication>-id. This mechanism enables you to use a non-writeable authentication system as your primary AuthenticationManager whilst having a writable secondary AuthenticationManager to store additional data. |
portal.modules.* | List | All portlet instances defined in the Portal Template, identified by their pnode id. |
portal.portlets.* | List | Alias for portal.modules.* |
portal.pboxes.* | List | All pboxes defined in the Portal Template, identified by their id. |
portal.pboxes.*.moduleid | String | The portlet instance currently loaded in this pbox, identified by it's pnode id. |
portal.vars.time | String | Current time as String. e.g. 19:20 |
portal.vars.date | String | Current date as String. e.g. 25.12.2006 |
portal.vars.now | Date | Current date as 'Date' object. |
portal.vars.timestamp | Integer | Current date as timestamp. (Seconds since midnight, January 1, 1970 UTC.) |
portal.language | String | The current language, and a synonym for portal.language.name |
portal.language.name | String | The display name, including the defined locales, of the language. |
portal.language.id | String | The id of the language |
portal.language.language | String | The language of the languages' locale. |
portal.language.country | String | The country of the languages' locale. |
portal.language.variant | String | The variant of the language's locale. |
portal.languages | List | A list of all configured languages. See portal.language for their properties. |
portal.languages.[id] | Object | Language with the specified id. See portal.language for its properties. |
portal.defaultLanguage | Object | The global default language as configured in the portal configuration. |
portal.request.path | String | Any extra path information associated with the URL the client sent when it made this request. |
portal.request.port | Integer | The port number on which this request was received |
portal.request.queryString | String | The query string that is contained in the request URL after the path. |
portal.request.host | String | The host name of the server that received the request. |
portal.request.parameters.* | Object(s) | Parameters of the request. |
portal.request.remoteAddress | String | The Internet Protocol (IP) address of the client that sent the request. |
portal.request.remoteHost | String | The fully qualified name of the client that sent the request. |
portal.request.servletPath | String | Returns the part of this request's URL that calls the servlet. This includes either the servlet name or a path to the servlet, but does not include any extra path information or a query string. Typically, this will return either "/portal" or "/secure". |
portal.request.contextPath | String | Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. Normally this will return "/Portal.Node". |
portal.request.protocol | String | Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
portal.request.requestURI | String | Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. Typically the requestURI is something like "/Portal.Node/portal". |
portal.request.requestURL | String | Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters. |
portal.request.scheme | String | Returns the name of the scheme used to make this request, for example, http, https. |
portal.request.secure | Boolean | Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
portal.request.method | String | Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
portal.request.* | Object | Returns the return value of the corresponding bean getter method from the request object. See the Servlet API for available properties. (e.g. portal.request.localAddr) |
portal.session.tmpdir | String | Path of the directory for temporary (session) files. Files stored in this path will only be available to this session and will be automatically removed when the session is invalidated or during startup and shutdown of Gentics Portal.Node |
portal.session.id | String | Id of the current session. |
portal.properties.* | Object(s) | Access (readable and writeable) to the portal properties. |
portal.pagesetting | String | String containing the current page setting of the user, if portal pages are used (for storing user defined setting). See “General Parameters for portal pages” (Section 8.9.2) for details about storing the user settings. |
portal.pages | Map | Map of portal pages, contains only the portal pages that have no rule defined or have a rule that currently matches. |
portal.pages.[pageid] | Object |
Portal page with id pageid .
|
portal.pages.[pageid].positions | Map | Map of positions in the portal page of the given id. |
portal.pages.[pageid].positions.[positionid] | Object |
Position with id
positionid
in the portal page with id
pageid
.
|
portal.pages.[pageid].positions.[positionid].portlets | List | List of portlet ids from portlets currently placed in the referenced position. This can be modified to change the positioning of portlets on the portal page. |
portal.pages.[pageid].reset | N/A | Set this attribute to any value (e.g. true) to reset the current user settings of a portal page. |
portal.page | Object |
The currently set portal page. It is possible to switch the current portal page by setting this property to the id of the desired portal page. When no portal page exists with the given id, or the requested portal page is invisible due to the given portal page rule, the current portal page is not changed. This object also provides access to information of the current portal page. |
portal.request.host | String | Hostname included in the http request to the portal. |
portal.request.port | Integer | Port to which the http request was directed. |
portal.request.path | String |
Path information included to the request
to the portal. This does not contain the
path of the portal (usually
/Portal.Node
) and the path to the servlet (usually
/portal
,
/public
or
/secure
).
|
portal.request.queryString | String | Query String contained in the http request. |
portal.request.parameters | Map | Map of parameters included in the http request. |
portal.response.redirect | String | This property can be used in reactions (ie. BEFORE the render phase) to force a HTTP redirect to another URL. |
portal.createPortalURL() | Portal URL |
Returns a portal URL which you can use (for example) to create a custom event. Can only be used in Velocity code. |
## Create a triggerEvent URL #set( $eventurl = $portal.createPortalURL("triggerEvent") ) ## Set the event name $eventurl.setParameter("event", "simpletest") ## add some various arguments $eventurl.setParameter("someargument", "somevalue") ## output the event url <a href="$eventurl">My Event URL</a> ## this example will trigger an event called: "portal.events.simpletest" ## it will also contain 'somevalue' at event.properties.someargument |
This PortalPropertyPaths are provided by the ViewPlugin in all View Rules and Component Templates.
Table 4.157. View PortalPropertyPaths
Name | Type | Description |
---|---|---|
views | List | List of all views. A single view can be accessed by either resolving it by its id (see below), or by iterating over the views List. |
views.[id] | Object | A view object, see view |
view | Object | The current view |
view.label | String | Label of the view. |
view.link | String | URL that activates this view. |
view.components | List | All components of the current view, visible and invisible. |
view.components.[id] | Object | A component. See Section 2.2.7.1, “All Components”. |
view.components.[id].[property] | Object | A component property. |
view.components.[id].[property].data | Object | The value of a component property. |
view.properties | Map | All custom view properties, which can be read and/or set with this path. |
view.properties.[id] | Object | Value of the custom view property [id] or null if the property is not set. |
data | Object | Data provided by the Pluggable Action container. |
actions | List | List of actions |
actions.[id] | Object | Action object |
actions.[id].[property] | Object | Action response properties. |
module.* | Object | The portlet that contains this view. See Section 8.3, “Modules” for more details. |
Generic Properties provided by AbstractGenticsPortlet. (Usually available as portal.modules.<module id>)
Table 4.158. AbstractGenticsPortlet - Property Paths
Name | Type | Description |
---|---|---|
parameters | Resolvable | Portlet Parameters |
properties | Resolvable | Portlet Properties |
plugins | Resolvable | Resolves all used plugins. (plugins.<plugin id> would resolve the plugin with the given id) |
session | Resolvable | Resolves information about the portlet's session. |
session.id | String | Current session id. |
session.portletscope.* | Object(s) | Access (readable and writeable) to the session attributes in portlet scope (attributes are only visible to this portlet). |
session.appscope.* | Object(s) | Access (readable and writeable) to the session attributes in application scope (attributes are visible to all portlets in the same portlet application). |
![]() | Note |
---|---|
Attribute data stored in the application scope of a portlet's session is not visible to portlets of another portlet application. If you need to store session specific data portal wide, you can use the portal properties. See Section 8.1, “Portal” for details on the portal properties. |
The property path starting with "position" is only available in velocity templates (starting with the portletframe template) and only if portal pages are used.
Details on the objects can be found in the API documentation.
Table 4.160. Portlet PortalPropertyPaths
Name | Type | Description |
---|---|---|
javax.portlet.config | Object | Portlet configuration |
javax.portlet.context | Object | Portlet context |
javax.portlet.request | Object | Portlet request |
javax.portlet.request.preferences.* | Object | Portlet Preferences |
javax.portlet.request.parameters.* | Object | Parameters |
javax.portlet.request.portletMode | String | The current portlet mode in which this portlet is rendered. |
javax.portlet.request.windowState | String | The current window state in which this portlet is rendered. |
javax.portlet.response | Object | Portlet response |