Gentics Portlets Overview and General Features

Here you can find more detailed information about the Gentics Portlets and their general features. Many of them are switched on by default. Others can be switched on manually. For specific description of certain portlets please see the subpages on the left.


General Features

The following features are available for all portlets of the Gentics Portlet Suite.

Print View

All portlets need to be able to recognize a print view parameter. This parameter is provided as URL parameter for example:

...&print=true

When print parameter is present in the URL, than this parameter is transmitted via javax.portlet.RenderRequest object print parameter in the portlet. In order to access the print variable, use the velocity variable: ${print}. If the URL contains the parameter this variable is true.

Versioning functionality in resource serving

To be able to cache the static content in the Browser portlets (content portlet, sidebar portlet), version number should be added in the URLs. This feature will allow turned on and off by a switch of parameter serveResource.version in each portlet instance configuration property file. Configuration files are located in the portletsuite-config module at:

{yourconfigfolder}\rest\content.properties

The edittimestamp of the files/pages can be fetched from the CRResolvableBean class getString(java.lang.String) method received by the ContentConnector in order to be able to cache the resources in the browser. This functionality is implemented in StandardPortalPLinkReplacer classreplacePLink(com.gentics.api.portalnode.connector.PLinkInformation) method. For detailed implementation information please see the Javadocs

Liferay Friendly URLs

Liferay portal have possibility to display URLs in more user friendly format. This functionality is configured in portletsuite-webapp at:

src\main\resource\content-url-routes.xml
src\main\webapp\WEB-INF\liferay-portlet.xml

configuration files. liferay-portlet.xml define in which configuration files routes are configured and content-url-routes.xml define the routes.

Multiple group recognition in PermissionChecker

In order to have more refined and granular permission check, mapping mechanism between portal privileges and CMS privileges is introduced. This mapping is defined through configuration file:

{yourconfigfolder}\rest\permissionchecker.properties

Permission check is performed by comparing permissions defined in configuration file and permissions retrieved from the CMS system. Properties in the permissionchecker.properties file are defined like:

# portal group name
group.edit.1.portal=admin
# cms group ids to map on this portal group
group.edit.1.cms=1,2,3

group.view.1.portal=admin
group.view.1.cms=1,2,3

Preview functionality

This functionality give possibility to display CMS saved but not yet published content in the portlet. In order to switch on this functionality in the portlet, corresponding portlet configuration properties should be set. CMS request processor class can be set in the portlet configuration file via rp.1.rpClass property for example:

rp.1.rpClass=com.gentics.cr.cms.DummyCMSRequestProcessor

These properties are in configuration files:

{yourconfigfolder}\rest\content.properties
{yourconfigfolder}\rest\navigation.properties //(corresponding configuration file for every navigation portlet)

For navigation portlet since doNavigation attribute value is set to true, sub folders will be also included in the result.

Portal Context Recognition (since 1.0.0)

In order to be able to change default display pages in the portal you can specify a special routing in the configuration file

{yourconfigfolder}\rest\portaldefaultcontent.properties

Here you can describe a mapping that routes a portal context property to a contentid (content page) that should be displayed by default.

Example configuration:

# specifies the portal context property key
portalcontext.key=gps-portalcontext

# specify your mappings as follows:
customer1=10007.123
customer2=10007.456
...