In previous article content modeling in Alfresco I had explained about content modeling how to start with content model and how to create it. Now once we have it deployed in the alfresco we will create contents with that custom content types but now we also need to be able to search those documents and in order to add your custom content model in the Alfresco Share advance search you need to follow the steps below.
Create your custom Content Model which contains your custom content type and custom aspects as explained in earlier post content modeling in Alfresco.(customModel.xml)
Register that content model through context file. It contains the location of model.
Add that custom type and custom aspect in the Alfresco share configuration file.
Check the Type Entry in share-config-custom.xml file under Document Library Config
<subtype name=”my:sop” />
<subtype name=”iabook:Product” />
Create search Form in share-config-custom.xml file for how to show and what are the properties to be shown while your custom type is selected during the advance search.
There will be two config entries under that file one under Advance Search config which will add the custom content type in the list of available types in search dropdown as shown in below image.
- Content Model Deployment
Content Model to be deployed at path along with its context file
(customModel.xml and custom-model-context.xml)
- Custom Share file deployment
Place the share custom files i.e. share-config-custom.xml at
Test it in alfresco share. In drop down of content type you will see your custom content type.
When you select that you will be able to see your custom properties as well.
This is how we can add custom content type in Alfresco share advance search.