AnsweredAssumed Answered

problem to add a new content type

Question asked by asoph on Nov 8, 2006
Latest reply on Nov 9, 2006 by asoph
Hello

I've been trying to make a new content type, but I can't make it work!

I just took the example from the wiki to try it.

This is my model. I saved examplemodel1.xml in the repository tomcat/shared/classes/alfresco/extension

<model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Example custom Model</description>
   <author>AS</author>
   <version>1.0</version>

<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="my.new.model" prefix="my"/>
</namespaces>

<types>
      <type name="my:sop">
         <title>Standard Operating Procedure</title>
         <parent>cm:content</parent>
         <properties>
            <property name="my:publishedDate">
               <type>d:datetime</type>
      <mandatory>true</mandatory>
            </property>
            <property name="my:authorisedBy">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
     </type>
</types>
</model>

I changed the web-client-config-custom.xml in the alfresco/extension

<config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="my:sop" />
      </content-types>
   </config>

   <config evaluator="node-type" condition="my:sop">
      <property-sheet>
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />   
         <show-property name="title" show-in-edit-mode="true" />          
         <show-property name="my:publishedDate" show-in-edit-mode="true" />
         <show-association name="my:signOff" />
         <show-property name="my:authorisedBy" show-in-edit-mode="true" />
         <show-child-association name="my:processSteps" />
      </property-sheet>
   </config>

And I finally changed in the core-services-context.xml in the repository WEB-INF/classes/alfresco

<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                     <value>alfresco/extension/exampleModel1.xml</value>
            </list>
        </property>
    </bean>

With those changes, I can't see my new content type in Alfresco.
Did I forget to change something? Is something missing? or wrong?

Thank you so much for you help!! I really need to make it work…

Anne-Sophie

Outcomes