Follow the steps below to display custom properties on advanced search screen:

1. The property which needs to be displayed on advanced search page requires modification in web-client-config.xml which is located at - ALFRESCO_TOMCAT_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.xml.

2. Locate following condition evaluator in web-client-config.xml -

<config evaluator=”string-compare” condition=”Advanced Search”>

3. Advanced search condition evaluator has <advanced-search> child tag which has <custom-properties> child tag.

4. <custom-properties> child tag is used to define custom properties which get displayed on advanced search screen. For example look at the following code snippet:

<meta-data aspect=”cm:algocustompayment” property=”cm:algopayment” />

Click here to view how custom aspect “cm:algocustompayment” and its properties can be created.

5. <meta-data> tag has two attribute aspect and property.

6. The aspect attribute of <meta-data> tag declares the name of the aspect which will appear in drop down on advanced search page. The text in the drop-down to be displayed will be fetched from the “title” tag defined for the aspect in defaultCustomModel.xml.

7. The property attribute of <meta-data> tag declares the property of the aspect which will appear in list of search fields.

NOTE: In this case value of the aspect is “cm:algocustompayment” which will add the human readable name of aspects e.g. “Payment Aspect” to drop down and value of property is “cm:algopayment” which will display the human readable name in search field i.e. “Payment Amount”.

Please follow the steps below to create new aspects in Alfresco:

1. New aspects can be defined in defaultCustomModel.xml file located at ALFRESCO_TOMCAT_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/model/defaultCustomModel.xml.

2. Find <aspects> tag in defaultCustomModel.xml file. There is only one <aspects> tag and <aspects> tag can contain multiple <aspect> tag.

3. Each <aspect> tag defines a new custom aspect. For example look at the following code snippets:

<aspect name=”cm:algocustompayment”>
    <title>Payment Aspect</title>
    <properties>
        <property name=”cm:algopayment”>
            <title>Payment Amount</title>
            <type>d:text</type>
            <mandatory>false</mandatory>
            <index enabled=”true”>
            <atomic>true</atomic>
            <stored>true</stored>
            <tokenised>true</tokenised>
            </index>
        </property>
    </properties>
</aspect>

4. Each <aspect> tag has name attribute which is the name of the aspects.

5. Each <aspect> tag has <title> tag which is the human readable name of the aspect.

6. Each <aspect> tag has <properties> tag which defines the properties associated with that aspect.

7. Each <properties> tag can have multiple <property> tag. Each <property> tag defines a property associated with that aspect.

8. Each <property> tag has mandatory name attribute which defines the name of the property used within alfresco system to identify the property.

9. Each <property> tag has mandatory <title> child tag which is human readable name of the property.

10. Each <property> tag has <type> child tag which is used to define type of the property. The acceptable values are d:any, d:text, d:mltext, d:content, d:int, d:long, d:float, d:double, d:date, d:datetime, d:boolean, d:qname, d:noderef, d:childassocref, d:assocref, d:path, d:category, d:locale, d:version.

11. Each <property> tag has <mandatory> child tag which defines whether this property is mandatory or not. Acceptable values are true and false.

12. Each <property> tag has <index> tag which defines whether this property should be indexed by lucene or not.