Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Web Client CustomizationSearchAlfresco Explorer
The Advanced Search screen in the web-client can be extended to add additional custom types and attributes to search against.
Any type that inherits from cm:content or cm:folder can be configured to search against.
Find the following section in web-client-config-custom.xml (refer to the examples section below for details):
<advanced-search>
<content-types>
...
</content-types>
<folder-types>
...
</folder-types>
</advanced-search>
Types can then be added by adding <type> child elements, for example:
<type name='my:sop' />
The label used in the drop down list is retrieved by looking up the type title from the data dictionary.
Any valid property in the model (on either a type or an aspect) can be added via the web-client configuration.
Find the following section in the web-client-config-custom.xml file:
<custom-properties>
</custom-properties>
Properties can then be added by adding child elements to the <custom-properties> section, for example:
<meta-data type='cm:dictionaryModel' property='cm:modelAuthor' />
Each <meta-data> element adds a single property to the Advanced Search screen. They are added in the order as defined in the config file.
The <type> attribute is the model type containing the property and the <property> attribute specifies the property to use. The display label for the property will also be taken from the repository model definiton.
Instead of <type> it is also possible to specify an aspect containing the property instead, for example:
<meta-data aspect='app:simpleworkflow' property='app:approveStep' />
The UI will render the appropriate control for the type of the property as defined in the Data Dictionary. The following property types with associated rendered components are currently supported:
The UI will also render the appropriate label from the data-dictionary. A display-label-id attribute is also available, this can be used to set an I18N message Id to use instead of the data-dictionary label.
In Alfresco 2.1 list-of-values constraint bound properties are supported and will display as a drop-down list of values for selection.
Alfresco ships with an example web client configuration file which contains a section showing how to enable the SOP type defined in the Data Dictionary Guide for searching. This file is called web-client-config-custom.xml.sample and can be found in /tomcat/shared/classes/alfresco/extension if you are using the Tomcat bundle or /jboss/server/default/conf/alfresco/extension if you are using the JBoss bundle.
If the example model is enabled rename the sample web client config file to web-client-config-custom.xml and uncomment the following section.
<config evaluator='string-compare' condition='Advanced Search'>
<advanced-search>
<content-types>
<type name='my:sop' />
</content-types>
<folder-types>
</folder-types>
<custom-properties>
<meta-data type='my:sop' property='my:authorisedBy' />
<meta-data aspect='my:imageClassification' property='my:resolution' />
</custom-properties>
</advanced-search>
</config>
Existing properties from Alfresco types and aspects can also be added as the XML and screenshot below show.
<custom-properties>
<meta-data type='cm:dictionaryModel' property='cm:modelAuthor' />
<meta-data aspect='app:simpleworkflow' property='app:approveStep' />
<meta-data aspect='app:inlineeditable' property='app:editInline' />
<meta-data aspect='app:simpleworkflow' property='app:approveFolder' />
<meta-data type='cm:dictionaryModel' property='cm:modelPublishedDate' />
</custom-properties>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.