AnsweredAssumed Answered

How to set up multiple custom models?

Question asked by llin on May 14, 2008
Latest reply on May 16, 2008 by frederick
Hi there,

I got a question about how to set up multiple custom models, possibly with same properties.

When our Alfresco grows, I need to create more than one custom content models. Some models share several properties, but mostly different. For example, Model A has "URL" property, Model B has "URL" property and they are talking about the same thing. If I give them different prefix like "a:url" and "b:url" in the model definition file. Both them will work for itself. But when I got to write "web-client-config-custom.xml" file, a problem occurred. Here are some lines in the file:


<config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types> <!– Model A and Model B –>
            <type name="a:doc" />
            <type name="b:doc" />
         </content-types>
         <custom-properties>
          <meta-data type="a:doc" property="a:url" display-label-id="a.url" />
         <meta-data type="b:doc" property="b:url" display-label-id="b.url" />
……
         </custom-properties>
      </advanced-search>
   </config>

There are 2 URLs displayed in the "Advanced Search" extended properties. It seems very stupid, if I have more custom models and more shared properties in the future. Does anyone have any suggestion about that?  

Thanks a lot.

Ally

Outcomes