cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a custom model

huyajiecn
Champ in-the-making
Champ in-the-making
Hi all

I would like to manage a lot of audio files, so I need to create a custom model which is made up of some properties such as title, author, artist,genre and so on. Well, how can i do it? And how can i display the properties in the WCM when i add the data?

Thanks a lot!

P.S. I have read Data Dictionary Guide, but I don't know what to do except to create a .xml file in \tomcat\shared\classes\alfresco\extension. I'm a green hand, so I beg to receive a particular method.
4 REPLIES 4

stijndereede
Champ in-the-making
Champ in-the-making
Try reading this article: http://ecmarchitect.com/archives/2007/06/09/756
It helped me a lot. Also, be sure to check out his other articles on Alfresco, they're well written, and have useful examples (example files are included).

huyajiecn
Champ in-the-making
Champ in-the-making
Thanks!
I'm reading the article.

huyajiecn
Champ in-the-making
Champ in-the-making
stijndereede

I have read the article. Now, I'm face to a new problem. I have created a custom model and defined some properties in a .xml file.
<type name="sc:doc">
         <title>Someco Document</title>
         <parent>cm:content</parent>
         <properties>
            <property name="sc:Aproperty">
               <type>d:datetime</type>
            </property>
            <property name="my:Bproperty">
               <type>d:text</type>
            </property>
            <property name="my:Cproperty">
              <type>d:text</type>
            </property>
         </properties>
         <associations>
            <association name="sc:relatedDocuments">
               <title>Related Documents</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>sc:doc</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>
         <mandatory-aspects>
           <aspect>cm:generalclassifiable</aspect>
         </mandatory-aspects>
      </type>
When I add a content in a space, I would like to edit its properties in the wizard. I don't know how to do it? Could you help me?

rivarola
Champ on-the-rise
Champ on-the-rise