Hi all,
I want to create a template folder for the new client site. It will create a folder foreach client with some content.
Can I force that everything under the new created client folder will be tagged with the client name (folder name)??
So for that I should have a process which creates a tag with the client name when the template is used.
It could be nice if someone can direct me on the right direcction.
Thanks!
Hi,
you could add a rule to your folder template, that executes a Javascript and fires on "create or moved" (I think) on the folder and all sub folders. But a Customer name is probably hard to transfer in a tag (imagine "ACME Co. Inc. and Sons"). Rules are also included by creating a folder from a template.
You should better create a custom document model, which is easy in community >=5.1 because of the admin tools/model manager. Create, for example, a customerData aspect, which holds every standard-metadata-field that should be applied to your documents in the customer folder. Then, add an "add aspect" rule to your template which simply adds this aspect to the documents created in the folder...
But for your tagging example, you would need a "rule script" like
if (document.isDocument) {
document.addAspect("cm:taggable");
document.addTag(space.name);
};
that is applied to all subfolders and adds the tag to every document created or moved to your folder. But beware, this is "quick and dirty", because the name of your space folder may not be ideal for a tag-name and could throw an error that prevents you from adding documents to your folder. If your structure is only one level deep (no more subfolders under the customer folder) you could use "parent" instead of "space" in the above script.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.