Create custom datalist with category association
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2013 02:16 PM
Hello everyone,
I need to create a datalist custom that allows the user to associate categories to items. I know you can use associations as "cm: person", "cm: content", "cm: cmobject", but when I try to use "cm: category" it does not work and does not gives error, in form appears the option to select the categories but does not appear the categories, only folders.
See my code:
I need to create a datalist custom that allows the user to associate categories to items. I know you can use associations as "cm: person", "cm: content", "cm: cmobject", but when I try to use "cm: category" it does not work and does not gives error, in form appears the option to select the categories but does not appear the categories, only folders.
See my code:
<associations> <association name="pro:categories_data_list"> <title>Categories</title> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>cm:content</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations>
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2015 02:41 PM
Did you ever find a fix for this issue?
I'm using a d:category property which works well enough but in the DataList display, the noeref is displayed and not the category value. It's really annoying
I'm using a d:category property which works well enough but in the DataList display, the noeref is displayed and not the category value. It's really annoying
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2015 12:27 PM
Hi,
This make far long time, let-me see if i remember.
I think that i put in my custom datalist type the mandatory aspect "categories" like this:
And…
on share-config-custom.xml i put:
I hope that this can help you.
This make far long time, let-me see if i remember.
I think that i put in my custom datalist type the mandatory aspect "categories" like this:
<mandatory-aspects> <aspect>cm:taggable</aspect> <aspect>cm:generalclassifiable</aspect> </mandatory-aspects>
And…
on share-config-custom.xml i put:
<field-visibility> <show id="cm:taggable" force="true" /> <show id="cm:categories" /> </field-visibility> <appearance> <field id="cm:taggable"> <control> <control-param name="compactMode">true</control-param> <control-param name="params">aspect=cm:taggable</control-param> <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param> <control-param name="createNewItemIcon">tag</control-param> </control> </field> <field id="cm:categories"> <control> <control-param name="compactMode">true</control-param> </control> </field> </appearance>
I hope that this can help you.
