Jūs skatāties palīdzības saturu versijai:
- 6.4
- 6.3
- Vecākas versijas
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.
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.
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.
Piezīme.
If you have already added a custom property, the property starts appearing on the asset creation page. To hide such a property, see Show/Hide Custom Properties On Asset Creation and Properties pages.

-
Under the newly created items folder, add a node for the custom property in all the asset (Example: GeoLocation) using the following steps:
-
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/coral/foundation/form/textfield
-
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.
Piezīme.
You may need to clear the browser cache before your customization appears in the UI.
Piezīme.
The common properties for all assets that you add appear in the basic tab of the asset properties. By default, the common properties added for all assets appear on the properties page as well as the asset creation page. To hide the common properties, you need to [link to show / hide properties].
This scenario shows how you can add a custom property to all the asset types and add drop-down values to it.
-
Name Type Value fieldLabel String The name you want to give the field/property. (Here: geographicallocation) name String ./extendedproperties/geographicallocation (Keep the value same as the field name you created under the items node) renderReadOnly Boolean true sling:resourceType String granite/ui/components/coral/foundation/form/select
-
Under property node (here geographicallocation), add a new node with name items. Under the items node, add a node each for the values in the drop-down. As a good practice, add the first node as blank to serve as the default value of the drop-down and an option for the user to specify no value for the field. To add multiple options/drop-down values, repeat the following steps:

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.

-
To add this tab for Letters, create an overlay folder with path/structure similar to the following items folder at the following path:
/libs/fd/cm/ma/gui/content/cmmetadataproperties/properties/letter/items/tabs/items
To create overlay for a letters or a different asset use the following path by replacing [assettype] with text, condition, list, datadictionary, or fragment:
/libs/fd/cm/ma/gui/content/cmmetadataproperties/properties/[assettype]/items/tabs/items
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

-
To create a tab in an asset type (such as Text), create the following folder structure in the apps folder:
/libs/fd/cm/ma/gui/content/cmmetadataproperties/properties/[AssetType]/items/tabs/items
[AssetType] = text, condition, list, letter, datadictionary, or fragment
Following are the steps to create this folder structure:
-
Right-click the items folder at the following path and select Overlay Node:
/libs/fd/cm/ma/gui/content/cmmetadataproperties/properties/[AssetType]/items/tabs/items
For example, if you want to create a property for text assets, select the following folder:
/libs/fd/cm/ma/gui/content/cmmetadataproperties/properties/text/items/tabs/items
-
By default, the custom properties added to new tabs are visible only on the properties page and not on the asset creation page, as the asset creation page doesn't have tab layout. To display the custom properties on the asset creation page along with other properties, you need to do the following:
-
Ensure that the Overlay Node dialog has the following values, for letter. For other asset types, path is given in the following table:
Path: /libs/fd/cm/ma/gui/content/createasset/createletter/jcr:content/body/items/form/items/letterWizard/items/properties/items/properties/items/letterproperties/items
Location: /apps/
Match Node Types: Selected
Asset/document type Path to be added Text /libs/fd/cm/ma/gui/content/createasset/createtext/jcr:content/body/items/form/items/textwizard/items/editproperties/items/properties/items/tabs/items/tab1/items List /libs/fd/cm/ma/gui/content/createasset/createlist/jcr:content/body/items/form/items/listwizard/items/editproperties/items/properties/items/tabs/items/tab1/items Condition /libs/fd/cm/ma/gui/content/createasset/createcondition/jcr:content/body/items/form/items/conditionwizard/items/editproperties/items/properties/items/tabs/items/tab1/items Fragment /libs/fd/cm/ma/gui/content/createasset/createfragment/jcr:content/body/items/form/items/fragmentwizard/items/properties/items/properties/items/tabs2/items/tab1/items Letter /libs/fd/cm/ma/gui/content/createasset/createletter/jcr:content/body/items/form/items/letterWizard/items/properties/items/properties/items/letterproperties/items -
Under the overlay items node you created, create a node of the name col4 (or any other name) and click Save All.
For example, following is the overlay node created for letters.
/apps/fd/cm/ma/gui/content/createasset/createletter/jcr:content/body/items/form/items/letterWizard/items/properties/items/properties/items/letterproperties/items
-
Name Type Value path String This path is the pointer to the column created in:
- For common tab for all asset types: /apps/fd/cm/ma/gui/content/cmmetadataproperties/commontab/items/col1
- For different properties for different asset types: /apps/fd/cm/ma/gui/content/cmmetadataproperties/properties//items/tabs/items/customtab/items/col1
sling:resourceType String granite/ui/components/coral/foundation/include
Custom property, Language, appearing in the UI for creating a letter
After you have added a custom property to Correspondence Management assets, you need to make further changes in CRX/DE to ensure that the custom property is displayed in the Correspondence Management UI.
Complete the following steps to display the custom property in the Correspondence Management's asset list UI:
-
Open the childlistpage.jsp file (/apps/fd/cm/ma/gui/components/admin/childpagerenderer/childlistpage/childlistpage.jsp) and make the following changes:
-
Add the following code of a function that gets value for each custom property to the end of the file:
<%! private String getCustomPropertyValue(Map<String, Object> extendedProperties, String propertyName) { String propertyValue = ""; if (extendedProperties.containsKey(propertyName)) { propertyValue = (String) extendedProperties.get(propertyName); } return propertyValue; } %>
-
<% String GeoLocation = ""; if (asset != null) { Map<String, Object> extendedProperties = asset.getExtendedProperties(); if (extendedProperties != null) { GeoLocation = getCustomPropertyValue(extendedProperties,"GeoLocation"); } } %>
-
To view your customization, open list view of document fragments, or letters in which you have added the custom property.
The UI column and property added in this procedure is displayed for all asset types. However, the values in these properties can be entered and displayed only for the asset types for which you originally added the custom property.
For example, using the Scenario: Adding custom properties for specific asset types you add a custom property to text assets, you can enter custom properties to text assets only. If, however, you display that custom property in the UI, the column appears for all asset types.
-
(Optional) By default the new column appears as the last column in the UI. To make the column appear at a specific position, add the following property to the column node:
Name Type Value sling:orderBefore String The name of the column node at path "/libs/fd/cm/ma/gui/content/cmassets/jcr:content/views/list/columns" before which custom column needs to appear on UI.
Here, if you want Geographical Location column to appear before (to the left of) the Version column, add the property sling:orderBefore to GeoLocation node at path ""/apps/fd/cm/ma/gui/content/cmassets/jcr:content/views/list/columns/GeoLocation" and set the value of property to version.
When you add the sling:orderBefore property to specify the column location, then you also need to update the order of the corresponding <td> tag specified in step 6.4 of this procedure. For example, in this case, you need to ensure that the <td> tag of Geographical Location is placed before <td> tag of Version column:
<td is="coral-td" value="<%= xssAPI.encodeForHTMLAttr(geographicalLocation) %>"><%= xssAPI.encodeForHTML(geographicalLocation) %></td> <td is="coral-td" value="<%= xssAPI.encodeForHTMLAttr(version) %>"><%= xssAPI.encodeForHTML(version) %></td>
By default, full text search doesn't include custom properties that you add to the UI using CRX/DE.
To include the custom properties in search, you need to allow indexing of custom properties.
To allow indexing of custom properties, complete the following steps:
Piezīme.
If you are still unable to search, it may be because of an indexing issue. For re-indexing, go to the following node and change value of property "re-index" to true:
/oak:index/cmLucene" and change value of property
Piezīme.
These steps change the default view of all consoles such as Forms and Documents, Assets, and Sites.