Reputation: 70307
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="my:propQName">
<title>QName Property</title>
<type>d:qname</type>
</property>
<property name="my:propNodeRef">
<title>Node Reference Property </title>
<type>d:noderef</type>
</property>
<property name="my:propPath">
<title>Path Property </title>
<type>d:path</type>
</property>
Upvotes: 1
Views: 1211
Reputation: 13514
You need to create an association:
<associations>
<association name="my:relatedImage">
<source>
<mandatory>true</mandatory>
<many>false</many>
</source>
<target>
<class>my:imageType</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
</association>
</associations>
This will render by default as a picker. You can always configure the picker as usual in share-config-custom.xml
.
EDIT: official documentation on associations
Upvotes: 3