We have a list of keywords say - mobile, order_status,other etc as shown below.
This is how the field is displayed in the form now. This is a multi select list. The list keeps on growing and it becomes less user friendly to select. I want this keywords to be displayed with a picker list(something like implemented for tags). How do i do it? i checked association.ftl but it lists the repository as the items to select. How do i customize it to show list of keywords?
How about using a Category for that?
You can use category.ftl control and maintain the values in Admin section.
Hello,
In share config custom, you can have default path of a repository folder to be displayed.
You can achieve this by defining say a drop down folder in repository and add all the keyword items with a custom type. You can have content model define association with custom type.
Let me know this is helpful.
Hi,
I tried your suggestion by adding config as below.
<field id="common:keywords" >
<control template="/org/alfresco/components/form/controls/category.ftl" >
<control-param name="parentNodeRef">workspace://SpacesStore/440e96e5-f6d6-45b0-8c3d-9a1ea99fb88d</control-param>
</control>
</field>
This picks up the popup, starting with the custom category list I added, however when creating the content, it sets the noderef value as the value of the keyword property(i.e. instead of setting the text value to the keyword, it sets something like workspace://SpacesStore/440e96e5-f6d6-45b0-8c3d-9a1ea99fb5e0). This violates because the property keywords has a constraint which allows only a set of values. The value should be set as comma separated list of keywords that we have defined.
How do i configure the form to set the value as comma separated list of keywords that we select instead of passing the noderef.
Can you provide more insight on how to configure the category.ftl to set value correctly.
You have to use type "d:category" for your "keywords" property in Content Model.
Same issue even after changing to d:category. Not sure if we need to perform full reindex of solr
Yes, re-indexation is required. And also value re-assignment, as category stores a node ref pointing the value but not the real value.
How to do value re-assignment?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.