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
Add relavent i18 string in property file under test.properties
To add that property file, Go to tomcat\shared\classes\alfresco\web-extension
Modify – custom-slingshot-application-context.xml and add following code.
<bean id="webscripts.test.resources" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.test</value>
</list>
</property>
</bean>
Create property file named test.properties under \tomcat\shared\classes\alfresco\messages
Add following i18 string
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">
<forms>
<field-visibility>
<show id="cm:title"/>
<show id="doc:conName" />
<show id="doc:conNumber" />
<show id="doc:conStatus" />
<show id="doc:conType" />
</field-visibility>
</form>
</forms>
</config>
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">
<advanced-search>
<forms>
<form labelId="search.form.label.doc_testContractType" descriptionId="search.form.desc.doc_testContractType">doc:testContractType</form>
</forms>
</advanced-search>
</config>
Add relavent i18 string in property file under test.properties
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'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Add Knowledge Base messages --><bean id="webscripts.test.resources" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.test</value>
</list>
</property>
</bean>
</beans>
Create property file named test.properties 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">
<forms>
<!-- Following fields will be visible during advanced search form -->
<form id="search"><field-visibility>
<show id="cm:title"/>
<show id="doc:conName" />
<show id="doc:conNumber" />
<show id="doc:conStatus" />
<show id="doc:conType" />
</field-visibility>
</form>
</forms>
</config>