cancel
Showing results for 
Search instead for 
Did you mean: 

How to define ney data type

manuelgentile
Champ in-the-making
Champ in-the-making
I have to define a custom data type (not a content type).
The content type is a pair of strings (language, content) .
How can i do this?

Thanks in advance
1 REPLY 1

jmliege
Champ in-the-making
Champ in-the-making
Hello,

As far as I'm understanding, you will have to create your own type…

You just have to set parent to sys:base instead of cm:content then you define a language property, and an association with a content.

Here's a rapid sample made of cut/paste
(may not exactly corresponds to your needs)


<type name="prefix:yourdatatypename">
         <title>sample</title>
         <parent>sys:base</parent>
         <properties>
            <property name="prefix:language">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
         <associations>
            <child-association name="prefix:content">
          <target>
            <class>cm:content</class>
            <mandatory>false</mandatory>
            <many>false</many>
          </target>
      </child-association>
        </assocations>
</type>

NB: do not forget to import the System model.

<!– Import Alfresco Content System Model Definitions –>
         <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>

Hope it helps.

JMarc
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.