cancel
Showing results for 
Search instead for 
Did you mean: 

Create a folder structure automatically

fguillaume
Champ in-the-making
Champ in-the-making
Hello,

I need to create a space (folder) structure automatically. The use case behind this is when a user needs to add documents for a new client, he first create a complete folder structure before uploading documents into that structure.

What is the best way to do that? A change to the folder structure (the one that is created for each new client) should be easy to manage in Alfresco.

Many thanks!
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
Hi,

Yes this is possible - log in as admin and create the structure under:
Company Home/Data Dictionary/Space Templates

Then in the Advanced Space Wizard choose your template and the folder structure will be cloned for the new space.

Thanks,
Mike

slothrop
Champ in-the-making
Champ in-the-making
Can I use a space template to create a new space in Javascript?

mikeh
Star Contributor
Star Contributor
Hi

Yes you can - you can see an example of this in the Office Webscript, docActions.get.js:

nodeTemplate = search.findNode("workspace://SpacesStore/" + templateId);
nodeNew = nodeTemplate.copy(nodeParent, true);
nodeNew.name = spaceName;
…etc.
where templateId is the nodeId of the template you want to copy from and nodeParent is the space into which you want to create the new space.

Thanks,
Mike

slothrop
Champ in-the-making
Champ in-the-making
Thanks, Mike.  That's exactly what I need.