2.2.4.5. Friendly

This plugin is used to refine URLs in Content.

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



      <target-component>org.exoplatform.services.wcm.friendly.FriendlyService</target-component>

The configuration is applied mainly in packaging/wcm/webapp/src/main/webapp/WEB-INF/conf/content-extended/friendly/configuration.xml.

Sample configuration:


<external-component-plugins>
  <target-component>org.exoplatform.services.wcm.friendly.FriendlyService</target-component>
  <component-plugin>
    <name>FriendlyService.addConfiguration</name>
    <set-method>addConfiguration</set-method>
    <type>org.exoplatform.services.wcm.friendly.impl.FriendlyPlugin</type>
    <description>Configures</description>
    <priority>100</priority>
    <init-params>
      <value-param>
        <name>enabled</name>
        <value>${wcm.friendly.enabled:true}</value>
      </value-param>
      <!--
      <value-param>
        <name>servletName</name>
        <value>${wcm.friendly.servletName:content}</value>
      </value-param>
      -->
      <object-param>
        <name>friendlies.configuration</name>
        <object type="org.exoplatform.services.wcm.friendly.impl.FriendlyConfig">
          <field name="friendlies">
            <collection type="java.util.ArrayList">
              <value>
                <object type="org.exoplatform.services.wcm.friendly.impl.FriendlyConfig$Friendly">
                  <field name="friendlyUri"><string>${wcm.friendly.documents.friendlyUri:documents}</string></field>
                  <field name="unfriendlyUri"><string> ${wcm.friendly.documents.unfriendlyUri:/acme/detail?content-id=/repository/collaboration}</string></field>
                </object>
              </value>
              <value>
                <object type="org.exoplatform.services.wcm.friendly.impl.FriendlyConfig$Friendly">
                  <field name="friendlyUri"><string>${wcm.friendly.files.friendlyUri:files}</string></field>
                  <field name="unfriendlyUri"><string>${wcm.friendly.files.unfriendlyUri:/rest/jcr/repository/collaboration}</string></field>
                </object>
              </value>
            </collection>
          </field>
        </object>
      </object-param>
    </init-params>
  </component-plugin>
</external-component-plugins>

In which:

Field Type Value Description
friendlyUri string documents The object into which the friendly URI is applied.
unfriendlyUri string /acme/detail?content-id=/repository/collaboration The path to the location where the friendly URI is applied.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus