cancel
Showing results for 
Search instead for 
Did you mean: 

Create custom datalist with category association

fabiogomes_ti
Champ in-the-making
Champ in-the-making
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:

                <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>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
2 REPLIES 2

kpagratis
Champ in-the-making
Champ in-the-making
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

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:
<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.