Friday, March 25, 2011

How to customize Alfresco Share 3.4 Advanced Search Form

This post will guide you - how you can define your custom content type and custom properties in Share 3.4 advanced search form.

I am assuming, you know how to deploy custom content model and you have deployed CustomContentModel. Which contains doc:testContractType content type and some custom properties like doc:conName, doc:conNumber, doc:conStatus and doc:conType

Modify → \tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml

Add following configuration to include your custom content type in Advances Search option

<config evaluator="string-compare" condition="AdvancedSearch">
           <form labelId="search.form.label.doc_testContractType"         descriptionId="search.form.desc.doc_testContractType">doc:testContractType</form>

Add relavent i18 string in property file under
To add that property file, Go to tomcat\shared\classes\alfresco\web-extension
Modify – custom-slingshot-application-context.xml and add following code.

<?xml version='1.0' encoding='UTF-8'?>
<!-- Add Knowledge Base messages -->
    <bean id="webscripts.test.resources" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
          <property name="resourceBundles">

Create property file named under \tomcat\shared\classes\alfresco\messages
Add following i18 string

search.form.label.doc_testContractType=Test Custom Type
search.form.desc.doc_testContractType=Searches for all types of TestCustomType

To include custom fields for search, add following configuration in share-config-custom.xml under \tomcat\shared\classes\alfresco\web-extension\

<config evaluator="model-type" condition="doc:testContractType">
       <!-- Following fields will be visible during advanced search form -->
            <form id="search">
                        <show id="cm:title"/>
                        <show id="doc:conName" />
                        <show id="doc:conNumber" />
                        <show id="doc:conStatus" />
                       <show id="doc:conType" />


  1. Hello

    I am new to Alfresco Share Customization.

    We are 5 Developers Team which are going to work on Alfresco Share Customization.

    Please guide me how to Set Development Environment for working in Team for this customization Project.

    Please help.


  2. Hello Niketa,
    I have one query regarding Alfresco Share.I am not able to seen the .odt file in share preview.
    I am using Alfresco 3.4.d
    OS is Windows 7
    Thanks & Regards,

  3. will you be able to point some free lancers for training on alfresco

  4. This comment has been removed by the author.