Alfresco Share not showing subtype or custom type

2019-06-01 18:28发布

问题:

I have a custom model called "medicalBill" that inherits from another custom model called "clientDocument". For some reason in the share UI only the "clientDocument" is visible in the change type dialog. I have read that in the change type dialog it only shows models that are subtypes of cm:content. Does that mean ONLY direct subtypes?

I have this in my share-config-custom.xml is it not possible to have a subtype of a subtype here.

      <types>
         <type name="cm:content">
                <subtype name="cd:clientDocument">
                    <subtype name="mb:medicalBill"/>
                </subtype>

         </type>

         <type name="cm:folder">
         </type>
      </types>

Edit: I am running alfresco 3.4d on jboss under linux.

回答1:

Depending on which version of Alfresco you're using, the Change Type dialog in Share is configured differently

Alfresco < 3.4

You need to override the default configuration

Alfresco >= 3.4

You need to place the configuration in (e.g.) share-config-custom.xml

Regardless of the approach, the configuration will look like the following:

<type name="my:sourceType">
      <subtype name="my:targetType1"/>
      <subtype name="my:targetType2"/>
      ...
</type>

Where you specify which types are available for selection in the drop down (my:targetType*) depending on the type of the content you're acting on (my:sourceType).

As subtype elements cannot be nested, you have to specify all the possible type changes as sibling elements. As long as the source type is an ancestor type of the target type, everything should work as expected. To stick with your example:

  <types>
     <type name="cm:content">
            <subtype name="cd:clientDocument" />
            <subtype name="mb:medicalBill" />
     </type>

     <type name="cm:folder">
     </type>
  </types>

If you also need to show mb:medicalBill in the change type dropdown for cd:clientDocument documents you need to add another <type name="cd:clientDocument>..." element in the XML



标签: alfresco ecm