Here you can find documentation about the Gentics Sidebar Portlet
The Gentics Sidebar Portlets can display content that is attached to the main Content Portlet of a page. The Sidebar Portlets cannot work without one main Content Portlet in a Portal page. The Sidebar Portlet instance is listening to a specific attribute of the main page in order to get the contentId of the page the Sidebar instance should display. See the Parameters in the properties file to configure the Portlet instances.
In some cases it should be possible to override contentid parameter for displayed content of a specific portlet. Override contentid is possible through a portlet action URL that contains like
{portletname}_contentid
example URL:
...&sidebar1_contentid=10007.123...
Please check the corresponding manual of your portal how to generate an action URL.
The parameter is processed in AGenticsPortlet class getContentid(javax.portlet.RenderRequest) method. If parameter is overwritten than use this overwritten contentid, else try to use default global contentid, else use default contentid. For detailed implementation information please see the Javadocs.
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.
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
Velocity rendering allow to render content using velocity engine. Velocity rendering is switched on and off by switch parameter isvelocityrendered in portlet instance configuration property file.
with the attributes parameter you can specify a list of site attributes that should be accessible during Velocity rendering.
Those attributes have to be configured and setted up in the Tagmap-Editor in the Gentics Content.Node.
For detailed implementation information please see the Javadocs.
During the velocity evaluation you have access to the base velocity tools implementations in the context
$tools
Here you can find the available tool implementations.
Example:
#set($input = "hello & velocity)## #set($output = $tools.esc.html($input))## $output## returns "hello & velocity"
Configuration file is located in the portletsuite-config module at:
\src\main\resources\config\rest\sidebar{instanceNumber}.properties
The main part of the config are parameters for the Content Connector RequestProcessor of the portlet. You can find documentation for that in the Content Connector Wiki
Parameter | Type | Description |
---|---|---|
startpage | String | This is the contentId of the startpage of the Content portlet instance. If there is no contentId set by clicking a link or a menu element, the portlet will display this content, e.g. on the first access to a portal page. |
template | String | This is the path to the template jsp file that should be used to render the content portlet instance in normal display mode. The template file can be anywhere on the server but it recommended to store it in the configuration folder. |
propertyname | String | This is the property name the portlet instance will listen to. So if the main page displayed by the Gentics Content Portlet has an attribute (defined by a tagmap entry) sidebar1 and the propertyname of this portlet is set to sidebar1, this instance will always display the content page of this attribute. |
serveResource.version | Boolean (true/false) | please look here for detailed information |
isvelocityrendered | Boolean (true/false) | please look here for detailed information |
attributes | Set(String), comma separated | with that parameter you can specify additional parameters that are published in the Content Repository for this site and should be accessible in Velocity rendering please look here for detailed information |
If you are changing the configuration there dont forget to rebuild it and eventually redeploy it to your server as described in the setup guide.
Javadocs for Class: BaseSidebarPortlet