Here you can find documentation about the Gentics Content Portlet
Basically the Gentics Content Portlet is the main content display portlet of the Gentics Portlet Suite. In this portlet the selected main page can be displayed. To display a page the Public Render Parameter contentid should be set by any other portlet (e.g. Navigation Portlet).
If no contentid-parameter is set the portlet displays the configured startpage (see parameter here).
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.
In order to be able to display different error message for different users, error handling mechanism is introduced. When user is not logged in or does not have rights to view or edit content, error is thrown and this error is handled in AContentDisplayPortlet class handleError(javax.portlet.RenderRequest, javax.portlet.RenderResponse) method. If user want to display some specific message, than it should override this method and set custom message. 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\content{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. |
edittemplate | String | This is the path to the template jsp file that should be used to render the content portlet instance in the edit mode. The template file can be anywhere on the server but it recommended to store it in the configuration folder. |
serveResource.version | Boolean (true/false) | please look here for detailed information |
isvelocityrendered | Boolean (true/false) | please look here for detailed information |
searchconfigfilename | String | File name of the search result Content Connector location. Defaults to searchresult. For more information about the search result configuration options please look here |
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 |
Note: There are more configuration options for the content portlet regarding the search results described here.
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: BaseContentPortlet