AnsweredAssumed Answered

Problem with new content type/aspect

Question asked by sweep on Oct 11, 2006
Latest reply on Oct 11, 2006 by gavinc
Hi all,
I'm trying to add 3 new meta when I add a document using the examples i found in the wiki.
I was not sure if I had to use an aspect or a type, so I added a custom type and the example aspect.
I registered the Model with the Repository. I added the aspect and the type to web_config_properties.xml at the very bottom of the file.

I received no error (the model is OK) but no new field appeared in the edit property view.

I tried then to add the content type to the select in the wizard (as exposed in the web client customization wiki) and the content type is correctly displayed in the select.

I have some question:
1) what do I have to use a content type or an aspect?
2) Is there an error in my files or my approach is completely wrong?

Thank you for help.

This is my examplemodel:

<?xml version='1.0' encoding='UTF-8'?>
<model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Alfresco Content Model</description>
   <author>Alfresco</author>
   <version>0.1</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>

    <namespaces>
      <!– Define a Namespace for my new definitions –>
      <namespace uri="my.new.model" prefix="my"/>
   </namespaces>

     
   <!– Type and Aspect definitions go here –>
   <types>
      <type name="my:iop">
         <title>IO Procedure</title>
         <parent>cm:content</parent>
         <properties>
            <property name="my:productName">
               <type>d:text</type>
            </property>
            <property name="my:productCode">
               <type>d:text</type>
            </property>
            <property name="my:productBarcode">
               <type>d:text</type>
            </property>
       </properties>
      </type>
    </types>
    <aspects>
      <aspect name="my:imageClassification">
         <title>Image Classfication</title>
         <properties>
            <property name="my:width">
               <type>d:int</type>
            </property>
            <property name="my:height">
               <type>d:int</type>
            </property>
            <property name="my:resolution">
               <type>d:int</type>
            </property>
         </properties>
      </aspect>
      </aspects>
</model>

And this is what I added to the web-client-config-properties.xml file.

<config evaluator="aspect-name" condition="my:imageClassification">
      <property-sheet>
         <show-property name="my:width"/>
         <show-property name="my:height"/>
         <show-property name="my:resolution"/>
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="my:iop">
      <property-sheet>
         <show-property name="productName" />
          <show-property name="productCode" />
         <show-property name="productBarcode"/>
       </property-sheet>
   </config>



Marco

Outcomes