You can build your own Smart Folder Template using these guidelines.
A Smart Folder Template is a configuration file that contains one or more queries to define the nodes of a hierarchical tree of “smart” folders. It’s a JSON (Java Script Object Notation) file that defines one node object for every Smart Folder.
You can customize a copy of the smartFoldersExample.json template, which is available from Repository > Data Dictionary > Smart Folder Templates in Alfresco Share.
A node is defined by the following properties:
Property | Description |
---|---|
name | Mandatory folder name. |
id | Optional ID or number that is unique for the node in the template. This property is optional, however it is recommended as specifying an ID generates a much shorter (and permanent) noderef for the Smart Folder. |
description | Optional description, displayed in the detailed view. |
nodes | Optional collection of sub nodes (sub folders). |
search | Mandatory query defined using Alfresco FTS (full text search) language. The search is run when a Smart Folder is accessed by a user. |
language | Mandatory property, set to fts-alfresco. |
query | Mandatory FTS query that defines the folder content. |
filing | Optional rule that defines the filing action for a new file when it
is uploaded to the Smart Folder. If no filing rule is defined, files
can’t be uploaded to that folder. Parameters include:
|
path | Mandatory property in a filing rule. Path to store new documents. This is the ISO9075 encoded QName. |
classification | Mandatory property in a filing rule. Type and aspects of the new object. |
properties | Optional property. Defines property values and inheritance. |
Here are some tips on notation:
- Use percent (%) signs to use predefined placeholders in queries and filing rules
- For repository path expressions use QNames, for example; /app:company_home/st:sites/cm:swsdp/cm:documentLibrary.
- Special characters and whitespace are ISO9075 encoded. Use this notation to encode special characters in repository path names. For example, use _x0020_ for the whitespace character.
Placeholder | Description |
---|---|
%ACTUAL_PATH% | ISO9075 encoded repository path of the physical parent folder. Only the physical parent folder (or next physical folder up the folder tree) can use %ACTUAL_PATH%. |
%CURRENT_USER% | Account name of the user. |
_x0020_ | ISO9075 encoded whitespace character. |
<> | Use angle brackets, for example, <cm:name>, to inherit property values from the physical parent folder. Used for inheritance in a filing rule and in a query. |
The following code fragments give more information about these properties.