Alfresco定制类型未显示

时间:2015-12-17 08:59:25

标签: alfresco

我是露天新手,我尝试按以下方式创建自定义内容模型

<?xml version="1.0" encoding="UTF-8"?>
<model name="sw:translationmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">   
    <description>Translation Model</description>   
    <author>Basil</author>    
    <imports>        
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />        
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>        
    <namespaces>        
        <namespace uri="http://smartway-me.com/model/data/1.0" prefix="sw" />            
    </namespaces>
    <types>
        <type name="sw:doc">                
            <parent>cm:content</parent>                
        </type>
        <type name="sw:translatableDoc">
            <parent>sw:doc</parent>
            <mandatory-aspects>                    
                <aspect>sw:translatable</aspect>                    
            </mandatory-aspects>                
        </type>            
        <type name="sw:translationDoc">                
            <title>Translation Document</title>
            <parent>sw:doc</parent>
            <properties>                    
                <property name="sw:author">                        
                    <type>d:text</type>                        
                </property>                    
                <property name="sw:language">                        
                    <type>d:text</type>                        
                </property>                    
                <property name="sw:translationTime">                        
                    <type>d:date</type>                       
                </property>                    
            </properties>
            <associations>
                <association name="sw:translationOf">    
                </association>
            </associations>
        </type>            
    </types>
    <aspects>        
        <aspect name="sw:translatable">            
            <title>Translatable Doc</title>            
            <associations>               
                <association name="sw:translations">                    
                    <source>                        
                        <mandatory>false</mandatory>                        
                        <many>true</many>                        
                    </source>                        
                    <target>                        
                        <class>sw:translationDoc</class>                        
                        <mandatory>false</mandatory>                        
                        <many>true</many>                        
                    </target>                        
                </association>                    
            </associations>                
        </aspect>        
    </aspects>          
</model>

然后我尝试将以前模型中的类型和方面添加到share-config-custom.xml,我使用动态方法来部署自定义模型,但我的模型中的类型从未出现在创建菜单中,我在这里错过了什么?

这是我在share-config-custom.xml

中修改的部分
<aspects>
         <!-- Aspects that a user can see -->
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
            <aspect name="gd:googleEditable" />
            <aspect name="cm:geographic" />
            <aspect name="exif:exif" />
            <aspect name="audio:audio" />
            <aspect name="cm:indexControl" />
            <aspect name="dp:restrictable" />
            <aspect name="sw:translateable">
         </visible>
         ....
<types>
         <type name="cm:content">
            <subtype name="sw:doc" />
            <subtype name="sw:translatableDoc" />
            <subtype name="sw:translationDoc"/>
         </type>

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

         <type name="trx:transferTarget">
            <subtype name="trx:fileTransferTarget" />
         </type>

         <type name="sw:translationDoc">

      </types>

1 个答案:

答案 0 :(得分:2)

您必须在share-config-custom.xml中添加以下条目,才能在内容创建菜单中查看自定义内容类型。

<config evaluator="string-compare" condition="DocumentLibrary">

<types>
         <type name="cm:content">
            <subtype name="sw:doc" />
            <subtype name="sw:translatableDoc" />
            <subtype name="sw:translationDoc"/>
         </type>

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

         <type name="trx:transferTarget">
            <subtype name="trx:fileTransferTarget" />
         </type>

         <type name="sw:translationDoc">

      </types>

<create-content>
         <content id="plain-text" label="create-content.text" type="pagelink" index="10" icon="text">
            <param name="page">create-content?destination={nodeRef}&amp;itemId=sw:translatableDoc&amp;mimeType=text/plain</param>
         </content>
</create-content>

</config>

查看此条目

<content id="plain-text" label="create-content.text" type="pagelink" index="10" icon="text">
            <param name="page">create-content?destination={nodeRef}&amp;itemId=sw:translatableDoc&amp;mimeType=text/plain</param>
         </content>

您需要在此处指定自定义内容类型。

相关问题