cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Content Type is not listed in web client

nys
Champ in-the-making
Champ in-the-making
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
4 REPLIES 4

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

I don't see any problem with this. Did you restart your tomcat?


Best regards,
Shagul

nys
Champ in-the-making
Champ in-the-making
Hi Shagul,

Yes,I restarted Tomcat.Still its not working.What could be the problem.Its Alfresco 2.9 Enterprise edition.

Thanks,
nys

jbarmash
Champ in-the-making
Champ in-the-making
I just put in your config files into my installation of 2.2E, and I can add Record type, so not quite sure what is the problem.

archana_bonkanp
Champ in-the-making
Champ in-the-making
how to add drop down box with static values