-1

i need your help, I have created in Share a new type folder, called "TanFolder". it's on documentLibrary. I would like, when i create this folder, three other folders will be created automatically within it

Example: every time i create a TanFolder three folders will be automatically created in this tanFolder

the problem is that, I do not know where I need to make code changes

thank you

M.Lola
  • 1

1 Answers1

2

Several approaches are possible. It depends on the use case.

You can use space templates. These are defined in Data dictionary/Space templates and can be added in any site using the Create button in the toolbar. Just create a folderstructure once inside the space templates folder and you can reuse it every time. No code changes needed.

Or you can create a custom Rule for your new content type which executes a javascript that creates the subfolders every time a new TanFolder is created. Would require just a small javascript. The rest is condiguration.

A third approach is to use Alfresco Behaviours. This requires some java code and a bean declaration. If you are starting with Alfresco I would try the first two approaches first.

Nick Nagels
  • 131
  • 2
  • 3
    Some links: http://docs.alfresco.com/cloud/tasks/library-folder-rules-define-create.html http://docs.alfresco.com/5.0/tasks/space-nodes-create.html http://docs.alfresco.com/5.2/references/dev-extension-points-behaviors.html – Nick Nagels Apr 27 '17 at 13:22
  • thank you very much, Nick i used the first approach, because i don't know where i have to add javaScript code, i mean, if i want to edit something (in the share plateform) where did i put the code ? is it in the folder site-webscripts ? thank you – M.Lola Apr 28 '17 at 16:27
  • Create a JavaScript file write your logic in it and Put your JavaScript file in Data Dictionary/Scripts folder. – Vikash Patel Apr 29 '17 at 17:24