Add custom properties to Correspondence Management assets

Overview

You can customize Correspondence Management user interface and present users with a tailored set of properties and tabs. This customization includes adding custom fields/properties and tabs to specific asset types/letters or all the asset types and letters.

Adding custom properties to Correspondence Management assets

The following scenarios show how you can add properties/tabs to Correspondence Management assets and letters:

Adding a common property to all the asset types

Adding a common tab to all the asset types

Adding custom properties to specific asset types

By tweaking the properties, paths, and values in these scenarios, you can add custom properties and tabs to a different set of assets according to your requirements.

Scenario: Adding a common property to all the asset types

This scenario shows how you can add a custom property to all the asset types (text, list, condition, and layout fragments) and the letters. Using this scenario, you can add a property, Location of recipients, to all the assets and letters. The Location of recipients property helps identify which geographical area of delivery an asset or letter is relevant to.

Complete the following steps to add a custom property to all the asset types and letters:

Go to http://[server]:[port]/[ContextPath]/crx/de and login as Administrator.

In the apps folder, create a folder named css with path/structure similar to the css folder (located in ccrui folder) using the following steps:

Right-click the items folder at the following path and select Overlay Node:

Under the newly created items folder, add a node for the custom property in all the asset (Example: GeoLocation) using the following steps:

Right click the items folder and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: GeoLocation (or the name you want to give to this property)

Type: nt:unstructured

Click the new node you have created (here GeoLocation). CRX displays the node's properties.

Add the following properties to the node (here GeoLocation):

Name

Type

Value

fieldLabel

String

The name you want to give the field/property. (Here: Location of recipients)

name

String

./extendedproperties/GeoLocation (Keep the value same as the field name you created under the items node)

renderReadOnly

Boolean

true

sling:resourceType

String

granite/ui/components/foundation/form/textfield

Click Save All.

To view your customization, hover over an asset (text, list, condition, or layout fragment) or letter, click View Properties, and click Edit. The new field (Location of recipients) appears in the Basic tab in the asset/letter properties.

Note:

You may need to clear the browser cache before your customization appears in the UI.

Scenario: Common tab for all asset types

This scenario shows how you can add a custom tab, Recipients, to all the asset types (text, list, condition, and layout fragments) and the letters. The Recipients tab is where you can plan to put all your custom properties relevant to the recipients.

Using the following procedure, you can add a tab with a field to all your assets:

Go to http://[server]:[port]/[ContextPath]/crx/de and login as Administrator.

In the apps folder, create a folder named cmmetadataproperties with path/structure similar to the cmmetadataproperties folder (located in content folder) using the following steps:

Right-click the cmmetadataproperties folder at the following path and select Overlay Node:

/libs/fd/cm/ma/gui/content/cmmetadataproperties

Ensure that the Overlay Node dialog has the following values:

Path: /libs/fd/cm/ma/gui/content/cmmetadataproperties

Location: /apps/

MatchNode Types: Selected

Click OK. The folder structure is created in the apps folder.

Click Save All.

Under the cmmetadataproperties folder, add a node for creating a custom tab for all the assets (Example: commontab) using the following steps:

Ensure that the Create Node dialog has the following values and click OK:

Name: items

Type: nt:unstructured

Click Save All:

In the items node you created in the previous step (under CustomTab), add a node for creating a column (here Column1) in the custom tab using the following steps (to add more columns, repeat this step):

Right-click the items node and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: Column1 (Or the name you want to give to the node - this name does not appear in the User Interface.)

Type: nt:unstructured

Add the following property to the node (Here Column1) and then click Save All:

Name

Type

Value

sling:resourceType

String

granite/ui/components/foundation/container

In the node you created in the previous step (here Column1), add a node called items using the following steps:

Right-click the node (here Column1) and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: items

Type: nt:unstructured

Click Save All.

To create a field in the custom tab (here Recipients), add a node (here GeographicalLocation). This property corresponds to the column you created. Use the following steps to create the field (to create more fields/nodes, repeat these steps.):

Right-click the items node and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: GeographicalLocation (or another name for the field property)

Type: nt:unstructured

Add the following properties to the field node (here GeographicalLocation) and click Save All.

Name

Type

Value

fieldLabel

String

Location of recipients (or the name you want to give the field.)

name

String

./extendedproperties/GeographicalLocation

renderReadOnly

Boolean

true

sling:resourceType

String

/libs/granite/ui/components/foundation/form/textfield

To add this tab for Letters, create an overlay folder with path/structure similar to the following items folder at the following path:

In the newly created items folder, add a node for the custom tab in the asset (here mytab - this name does not show up in the User Interface) using the following steps:

Right click the items folder and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: mytab (or the name you want to give to this property)

Type: nt:unstructured

Click the new node you have created (here mytab). CRX displays the node's properties.

Add the following two properties to the node (here customtab):

Name

Type

Value

path

String

fd/cm/ma/gui/content/cmmetadataproperties/commontab

sling:resourceType

String

granite/ui/components/foundation/include

Click Save All.

To view your customization, hover over the relevant asset (here a letter), click View Properties, and click Edit. The new tab (Recipients) and field (Location of Recipients) appear in the user interface.

Note:

You may need to clear the browser cache before your customization appears in the UI.

Scenario: Adding custom properties for specific asset types

This scenario shows how you can add a property to a particular asset type, such as a field to all the text assets. Using this process, you can add properties to one of the following:

Text

Condition

List

Layout Fragment

Data Dictionary

Letter

For example, only to the text assets, you want to add a property, Location of recipients, to identify which geographical area an asset is relevant to.

To add a property to an asset type, complete the following steps:

Go to http://[server]:[port]/[ContextPath]/crx/de and login as Administrator.

To create a tab in an asset type (such as Text), create the following folder structure in the apps folder:

Ensure that the Create Node dialog has the following values and click OK:

Name: items

Type: nt:unstructured

Click Save All.

In the items node you created in the previous step (under customtab), add a node for creating a column (here Column1) in the custom tab using the following steps (to add more columns, repeat this step):

Right-click the items node and select Create > Create Node.

Ensure that the Create Node dialog has the following values and click OK:

Name: Column1 (or the name you want to give to the node)

Type: nt:unstructured

Add the following property to the node (Here Column1) and then click Save All.

Name

Type

Value

sling:resourceType

String

granite/ui/components/foundation/container

For each column you create (as specified in the previous step - here Column1), create a node called item using the following steps: