AnsweredAssumed Answered

Add custom aspect as a rule

Question asked by dave984 on Jun 6, 2013
Latest reply on Mar 28, 2014 by rjohnson
HI, my goal is to add to a folder a rule that automatically add an aspect to all the item in that folder. I'm using Alfresco 4.2.c .
So the point is how to add to the combobox(refer to the this image: ) of the available aspect the one i've created.
Here is my code for my custom model:

   <namespace uri="" prefix="myCustom" />

      <!– Enterprise-wide generic document type –>
      <type name="myCustom:docContentType">
   <!– Generic Aspect –>
   <aspect name="myCustom:aspect">
   <!– Product Content Aspect –>
   <aspect name="myCustom:productContentAspect">
         <property name="myCustom:annoEsercizio">

And here is the share-config-custom:

   <config evaluator="string-compare" condition="DocumentLibrary">
         <aspect name="myCustom:productContentAspect"/>
      <type name="cm:content">
         <subtype name="myCustom:productContentType"/>
   <config evaluator="aspect" condition="myCustom:productContentAspect">
            <show id="myCustom:annoEsercizio"/>                     
   <set id="myCustom_productContentPropertySet" appearance="bordered-panel" label-id="aspect.myCustom_productContentAspect"/>
        <field id="myCustom:annoEsercizio" set="myCustom_productContentPropertySet" label-id="prop.myCustom_annoEsercizio">
   <control template="/org/alfresco/components/form/controls/number.ftl" />