Clickable association in Custom model type

cancel
Showing results for 
Search instead for 
Did you mean: 
sakshik
Established Member

Clickable association in Custom model type

Jump to solution

Hello,

I have created a custom model type which has properties and associations. One of the associations is 'Related Document'  of class cm:content. 'Related Document' metadata lets you choose the document from Repository but the document is not clickable.

In share-config-custom.xml I have made:

<config evaluator="model-type" condition="aa:metadata">
   <forms>
      <form>
         <field-visibility>

            <show id="cm:title"/>
            <show id="aa:related_doc" />

        </field-visibility>

        <appearance>

            <field id="aa:related_doc">
                  <control template="/org/alfresco/components/form/controls/association.ftl">
                     <control-param name="showTargetLink">true</control-param>
                     <control-param name="allowNavigationToContentChildren">true</control-param>
                  </control>
            </field>

         </appearance>

   </form>

   <form id="doclib-simple-metadata">

         <field-visibility>

            <show id="cm:title"/>
            <show id="aa:related_doc" />

        </field-visibility>

        <appearance>

            <field id="aa:related_doc">
                  <control template="/org/alfresco/components/form/controls/association.ftl">
                     <control-param name="showTargetLink">true</control-param>
                     <control-param name="allowNavigationToContentChildren">true</control-param>
                  </control>
            </field>

         </appearance>

   </form>

</forms>

</config>

 

1 Solution

Accepted Solutions
sakshik
Established Member

Re: Clickable association in Custom model type

Jump to solution

Replaced

<config evaluator="model-type" condition="aa:metadata">

with

<config evaluator="node-type" condition="aa:metadata">

as

showTargetLink functionality works only on node-type evaluator

View solution in original post

1 Reply
sakshik
Established Member

Re: Clickable association in Custom model type

Jump to solution

Replaced

<config evaluator="model-type" condition="aa:metadata">

with

<config evaluator="node-type" condition="aa:metadata">

as

showTargetLink functionality works only on node-type evaluator