Alfresco Share not showing subtype or custom type

痴心易碎 提交于 2019-12-08 05:35:48

问题


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



来源:https://stackoverflow.com/questions/6792131/alfresco-share-not-showing-subtype-or-custom-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!