attachment in content model

cancel
Showing results for 
Search instead for 
Did you mean: 
sergus_dev
Active Member II

attachment in content model

Hi, 

Can anyone show me simple example where can I add custom content control to a share-config-custom in a configuration element <config evaluator="model-type" condition="sm:my_type">? Somthing like in a workflow model <show id="packageItems" />.

1 Reply
vidhipanchal
Established Member

Re: attachment in content model

Hi, 

You can do it as follows: 

1.) You have to add/create association in you content model as below

<type name="my:assType">
   <title>Someco Document</title>
      <parent>cm:content</parent>
         <associations>
            <association name="my:associationDocuments">
            <title>Association Documents</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>my:assType</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
      </associations>
</type>

2.) modify "share-config-custom.xml" like, 

<config evaluator="model-type" condition="my:assType">
   <forms>
      <form>
         <field-visibility>
            <show id="my:associationDocuments" />
           </field-visibility>
           <appearance>
               <field id="my:associationDocuments" />
           </appearance>
      </form>   
   </forms>
</config>

This link also may help you.

Regards,

Vidhi

ContCentric

Regards,
Vidhi