As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
… <types> <type name="myCustomModel:docType1"> <parent>cm:content</parent> <mandatory-aspects> <aspect>cm:author</aspect> <aspect>myCustomModel:details</aspect> </mandatory-aspects> </type> … <types> …
<types> <type name="cm:content"> <subtype name="YOUR-TYPE_HERE"/> </types>
<types> <type name="cm:content"> <subtype name="myCustomModel:docType1" /> <subtype name="myCustomModel:docType2" /> <subtype name="myCustomModel:docType3" /> <subtype name="myCustomModel:docType4" /> <subtype name="myCustomModel:docType5" /> <subtype name="myCustomModel:docType6" /> </type> <type name="cm:folder"> </type> <type name="trx:transferTarget"> <subtype name="trx:fileTransferTarget" /> </type> </types>
type.myCustomModel_docType1=Document description
myCustomModel_contentmodel.type.myCustomModel_docType1=Doc type 1 myCustomModel_contentmodel.type.myCustomModel_docType2=Doc type 2 myCustomModel_contentmodel.type.myCustomModel_docType3=Doc type 3 myCustomModel_contentmodel.type.myCustomModel_docType4=Doc type 4 myCustomModel_contentmodel.type.myCustomModel_docType5=Doc type 5 myCustomModel_contentmodel.type.myCustomModel_docType6=Doc type 6
type.myCustomModel_docType1=Doc type 1 type.myCustomModel_docType2=Doc type 2 type.myCustomModel_docType3=Doc type 3 type.myCustomModel_docType4=Doc type 4 type.myCustomModel_docType5=Doc type 5 type.myCustomModel_docType6=Doc type 6
<?xml version="1.0" encoding="UTF-8"?> <model name="myCustomModel:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>My custom Model</description> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" /> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" /> </imports> <namespaces> <namespace uri="myCustomModel.model" prefix="myCustomModel" /> </namespaces> <!– Types –> <types> <type name="myCustomModel:docType1"> <parent>cm:content</parent> <mandatory-aspects> <aspect>cm:author</aspect> … </mandatory-aspects> </type> … <type name="myCustomModel:docType6"> <parent>cm:content</parent> <mandatory-aspects> <aspect>cm:author</aspect> … </mandatory-aspects> </type> </types> <aspects> … </aspects> </model>
<alfresco-config> … <!– CUSTOM –> <config evaluator="string-compare" condition="DocumentLibrary"> <types> <type name="cm:content"> <subtype name="myCustomModel:docType1" /> <subtype name="myCustomModel:docType2" /> <subtype name="myCustomModel:docType3" /> <subtype name="myCustomModel:docType4" /> <subtype name="myCustomModel:docType5" /> <subtype name="myCustomModel:docType6" /> </type> </types> </config> <config replace="true" evaluator="string-compare" condition="AdvancedSearch"> <advanced-search> <forms> <form labelId="search.form.label.docType1">myCustomModel:docType1</form> … <form labelId="search.form.label.docType6">myCustomModel:docType6</form> </forms> </advanced-search> </config> … <config evaluator="model-type" condition="myCustomModel:docType1"> <forms> <form id="search"> <field-visibility> <show id="cm:author" /> <show id="cm:name" /> … </field-visibility> <appearance> <field id="cm:author"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> <field id="cm:name"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> … </appearance> </form> </forms> </config> … <config evaluator="model-type" condition="myCustomModel:docType6"> <forms> <form id="search"> <field-visibility> <show id="cm:author" /> <show id="cm:name" /> … </field-visibility> <appearance> <field id="cm:author"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> <field id="cm:name"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> … </appearance> </form> </forms> </config> </alfresco-config>