JBoss.orgCommunity Documentation
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>true</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>documents</string>
</field>
<field name="unfriendlyUri">
<string>/public/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>files</string>
</field>
<field name="unfriendlyUri">
<string>/rest-ecmdemo/jcr/repository/collaboration</string>
</field>
</object>
</value>
</collection>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
In which:
Name: FriendlyService.addConfiguration
Set-method: addConfiguration
Type: org.exoplatform.services.wcm.friendly.impl.FriendlyPlugin
Object type: org.exoplatform.services.wcm.friendly.impl.FriendlyConfig
Field | Type | Value | Description |
---|---|---|---|
friendlyUrl | string | documents | The object that will be applied the friendly URL. |
unfriendlyUrl | string | /public/acme/detail?content-id=/repository/collaboration | The path to the location that will be applied the friendly URL. |