<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic It's possible the auto tag-creation when a template is used? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/it-s-possible-the-auto-tag-creation-when-a-template-is-used/m-p/11557#M5100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a template folder for the new client site. It will create a folder foreach client with some content.&lt;/P&gt;&lt;P&gt;Can I force that everything under the new created client folder will be tagged with the client name (folder name)??&lt;BR /&gt;So for that I should have a process which creates a tag with the client name when the template is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It could be nice if someone can direct me on the right direcction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 10:28:14 GMT</pubDate>
    <dc:creator>aladme</dc:creator>
    <dc:date>2017-03-15T10:28:14Z</dc:date>
    <item>
      <title>It's possible the auto tag-creation when a template is used?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/it-s-possible-the-auto-tag-creation-when-a-template-is-used/m-p/11557#M5100</link>
      <description>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</description>
      <pubDate>Wed, 15 Mar 2017 10:28:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/it-s-possible-the-auto-tag-creation-when-a-template-is-used/m-p/11557#M5100</guid>
      <dc:creator>aladme</dc:creator>
      <dc:date>2017-03-15T10:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: It's possible the auto tag-creation when a template is used?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/it-s-possible-the-auto-tag-creation-when-a-template-is-used/m-p/11558#M5101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should better create a custom document model, which is easy in community &amp;gt;=5.1 because of the &amp;nbsp;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...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for your tagging example, you would need a "rule script" like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;isDocument&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addAspect&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"cm:taggable"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addTag&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;space&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;‍‍&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 08:08:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/it-s-possible-the-auto-tag-creation-when-a-template-is-used/m-p/11558#M5101</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-03-17T08:08:11Z</dc:date>
    </item>
  </channel>
</rss>

