cancel
Showing results for 
Search instead for 
Did you mean: 

How do I associate one piece of content with another

grauenwolf
Champ in-the-making
Champ in-the-making
I have two folders, one full of images and another full of text files.

How do I add a property to the text file that allows the user to pick an item from the image folder? (I know how to add basic properties like numbers and dates using aspects.)

I already tried these, but Share renders them as read-only boxes.


            <property name="mySmiley TongueropQName">
               <title>QName Property</title>
               <type>d:qname</type>
            </property>

            <property name="mySmiley TongueropNodeRef">
               <title>Node Reference Property </title>
               <type>d:noderef</type>
            </property>

            <property name="mySmiley TongueropPath">
               <title>Path Property </title>
               <type>dSmiley Tongueath</type>
            </property>
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Define an aspect. Maybe you'd call it "sc:relatedImage" or something where "sc:" is the abbreviation for your company's namespace.

Within the aspect, define an association. The association will relate your source object to the target image objects.

Here is a simple example from my custom content types tutorial:

<type name="sc:doc">
   <title>Someco Document</title>
   <parent>cm:content</parent>
   <associations>
      <association name="sc:relatedDocuments">
         <title>Related Documents</title>
         <source>
            <mandatory>false</mandatory>
            <many>true</many>
         </source>
         <target>
            <class>sc:doc</class>
            <mandatory>false</mandatory>
            <many>true</many>
         </target>
      </association>
   </associations>
   <mandatory-aspects>
     <aspect>cm:generalclassifiable</aspect>
   </mandatory-aspects>
</type>
This example defines an association on a type, but it works exactly the same for aspects. In this case, the association lets you track one or more "related" documents.

When Share renders this association in a form, it should do so as an object picker.

Jeff

grauenwolf
Champ in-the-making
Champ in-the-making
Thank you