Few days back I had written blog about the Dynamic content model later I realized that it would be really helpful if I could provide one example to explain that. So, here it is for you:
Example 1 (example model)
1. Deploy model ‘customModel.xml’ to the ‘Models’ space and select ‘Model Active’
A copy of the ‘customModel.xml’ can be found in the /alfresco/extension directory.
2. Upload a ‘web-client-custom-config.xml’ to the ‘Web Client Extension’ space that contains the customized UI
Location of Extension Configuration Files
Alfresco looks for a file called web-client-config-custom.xml on the classpath in the alfresco.extension package. If you downloaded one of the bundles you will find a sample file in the location below. Simply rename it for it to take effect.
If you are using JBoss that has had a previous version of Alfresco installed ensure your <jboss>/server/default/conf/alfresco folder only contains the extension sub folder, which in turn should only contain your custom files.
3. Re-load the custom UI by issuing the following command from the Web Client Config console:
4. Upload a ‘webclient.properties’ to the ‘Web Client Extension’ space that contains the labels related to custom properties:
To verify the changes follow this.
logout / login
- Use ‘Add Content’ to upload some content, and during the upload change the ‘Content Type’ from ‘Content’ to ‘Retailer Product’.
- Use ‘Advanced Search’, enter some search text to ‘Look For’ and also select ‘More Search Options’ and then ‘Retailer Product’ as the search ‘Content Type’
NOTE For more details on the example model sample, refer to Data Dictionary Guide. The deployment configuration file ‘example-model-context.xml’ (as mentioned in step 4) is not required when using dynamic models.