AnsweredAssumed Answered

Custom Content Type is not listed in web client

Question asked by nys on Aug 12, 2008
Latest reply on Oct 13, 2008 by archana.bonkanpally
HI All,

I m trying to create custom content type.I have all the three xml files in the /alfresco/extension directory.But the custom content type is not listed in Alfresco web client when i try to Add/Create content. Tomcat is not throwing any exceptions.Could someone please help me resolve the issue.

Here are the xml files.
customModel.xml

<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="pr:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>Custom Model</description>
   <author></author>
   <version>1.0</version>

   <imports>
        <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>


<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
   <namespace uri="custom.model" prefix="pr"   />
</namespaces>

<types>
   <type name="pr:record">
      <title>Record</title>
      <parent>cm:content</parent>
      <properties>
         <property name="pr:fname">
            <title>First Name</title>
            <type>d:text</type>
         </property>
         <property name="pr:lname">
            <title>Last Name</title>
            <type>d:text</type>
         </property>
         
         <property name="pr:info">
            <title>Case Number</title>
            <type>d:text</type>
         </property>
      </properties>
   </type>
</types>
    
</model>

custom-model-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>


web-client-config-custom.xml

<alfresco-config>

<config evaluator="node-type" condition="pr:record">
   <property-sheet>
   <show-property name="pr:fname" />
   <show-property name="pr:lname" />
   <show-property name="pr:info" />
  </property-sheet>
</config>


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

</alfresco-config>


Thanks,
nys

Outcomes