cancel
Showing results for 
Search instead for 
Did you mean: 

Aspect to add child spaces to a space

lnoto
Champ in-the-making
Champ in-the-making
Hi everyone, I'm a newbie.

I would like to understand if it is possible to add child spaces to a space simply applying an aspect to it from Web UI.

I don't mean to define an association to have a child of some type. Let's have an example:
- I created 'Folder1' space and I would like to give the aspect of a 'Gallery'; so applying this aspect 'Folder1' should have two child folders called 'Images' and 'Videp'

I can obtain this behaviour using templates, but I would like to automatize the creation of Galleries.

I learnt how to create custom Aspects and I saw how properties with default values could be assigned with them.
Could it be possible to associate something like a template model to the Aspect?

Thanks in advance,
Luigi
1 REPLY 1

kevinr
Star Contributor
Star Contributor
You can define associations in aspects, but you will still need to write the code to create the nodes on the end of the associations - it is not automatic. You can write a Rule that executes a custom Java action to do this now. In Alfresco 2.1 you will be create/add child associations and nodes using the JavaScript API - so you will be able to write a rule that adds the aspect and create the associated nodes in JavaScript no problem. The JavaScript API for this is in HEAD or the nightly build now.

Thanks,

Kevin