2.2.4.14. Portlet Template

This plugin is used to import the view templates into Content List Viewer.

To use the plugin in the component configuration, you must use the following target-component:


<target-component>org.exoplatform.services.cms.views.ApplicationTemplateManagerService</target-component>

The configuration is applied mainly in packaging/wcm/webapp/src/main/webapp/WEB-INF/conf/wcm-extension/dms/application-templates-configuration.xml.

Sample configuration:


<external-component-plugins>
    <target-component>org.exoplatform.services.cms.views.ApplicationTemplateManagerService</target-component>
    <component-plugin>
        <name>clv.templates.plugin</name>
        <set-method>addPlugin</set-method>
        <type>org.exoplatform.services.cms.views.PortletTemplatePlugin</type>
        <description>This plugin is used to import views templates for Content List Viewer</description>
        <init-params>
            <value-param>
                <name>portletName</name>
                <value>content-list-viewer</value>
            </value-param>
            <value-param>
                <name>portlet.template.path</name>
                <value>war:/conf/wcm-artifacts/application-templates/content-list-viewer</value>
            </value-param>
            <object-param>
              <name>Two columns CLV template</name>
              <description>Two columns CLV template</description>
              <object type="org.exoplatform.services.cms.views.PortletTemplatePlugin$PortletTemplateConfig">
                <field name="title">
                  <string>Two Columns</string>
                </field>
                <field name="templateName">
                  <string>TwoColumns.gtmpl</string>
                </field>
                <field name="category">
                  <string>list</string>
                </field>
              </object>
            </object-param>
            <object-param>
                ....
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

In which:

Value-param Type Value Description
portletName string content-list-viewer The name of the portlet.
portlet.template.path string war:/conf/wcm-artifacts/application-templates/content-list-viewer The path to the configuration of the portlet.
Field Type Description
templateName string The name of the GROOVY template.
category string The category name.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus