cancel
Showing results for 
Search instead for 
Did you mean: 

Web client support for subclasses of cm:folder

sirdodger
Champ in-the-making
Champ in-the-making
In much the same way that I can subclass from cm:content to create new kinds of content (with new metadata), I would like to be able to subclass from cm:folder to create new kinds of containers.

But currently, the UI for creating spaces does not ask for the type of space to be created.

Will this likely change in the future?

—–

I suspect my best bet for now is to create a custom aspect with the metadata I desire, to apply that aspect to a space, and then to turn that space into a template.  Then, any spaces created from that template will automatically have that aspect, and thus, the metadata fields I want.

Does that make sense?  Does anyone have a better way to achieve my goals?


Thanks in advance for any replies.
3 REPLIES 3

sirdodger
Champ in-the-making
Champ in-the-making
Related, I tried to build an association and I failed.


    <aspect name="my:Project">
      <title>Project Aspect</title>
      <associations>
        <association name="my:ProjectContains">
          <title>Uses Document</title>
          <description>Project uses Document</description>
          <source>
            <mandatory>false</mandatory>
            <many>true</many>
          </source>
          <target>
            <class>my:document</class>
            <mandatory>false</mandatory>
            <many>true</many>
          </target>
        </association>
      </associations>
    </aspect>

From what I can gather, this enables a many-to-many mapping between mySmiley Tongueroject and my:document.  Am I missing something?

Provided that I get this working, does the web client support association links?

gavinc
Champ in-the-making
Champ in-the-making
You can actually do what you said in the first post.

If you have a custom space type you can configure this into the web client so that the "Advanced Space Wizard" shows your custom type. You can then select that custom type and create the space.

To do this add the following config to your web-client-config-custom.xml file:


<config evaluator="string-compare" condition="Space Wizards">
   <folder-types>
      <type name="my:customspace" icon="/images/icons/your-icon.gif" description="This is my custom space type" />
   </folder-types>
</config>

The details page will still ask for the default set of metadata for the space, if you want to ask for the custom properties you will need to customise the advanced space wizard and replace the details page with your new one. You can configure this to only appear when your type is selected, see the following wiki pages for more information.

http://wiki.alfresco.com/wiki/Wizard_Framework
http://wiki.alfresco.com/wiki/Customising_The_Create_Content_Wizard

sirdodger
Champ in-the-making
Champ in-the-making
Fantastic!  Thanks for the help.