<?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 FreeMarker issue : get all parents hierarchy in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-issue-get-all-parents-hierarchy/m-p/307242#M260372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a beginner in Alfresco and I have already got an issue : I would like to display a button in the documentLibrary, but only if the current space&amp;nbsp; has a parent (or grand parent, etc.) which has a specific aspect. I know how to check this point but I don't know how to get back the entire hierarchy over the current space. My main issue is that we can't use while loops in freeMarker, so I would like to put all of them in a list but I don't know how…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's all, I'm sorry if this question has already been asked (or if it is stupid !), but I haven't found anything about it (neither in doc, forum nor freemarker doc). I use community 4.2 on centOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 May 2013 12:04:37 GMT</pubDate>
    <dc:creator>axis18</dc:creator>
    <dc:date>2013-05-10T12:04:37Z</dc:date>
    <item>
      <title>FreeMarker issue : get all parents hierarchy</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-issue-get-all-parents-hierarchy/m-p/307242#M260372</link>
      <description>Hello everybody,I'm a beginner in Alfresco and I have already got an issue : I would like to display a button in the documentLibrary, but only if the current space&amp;nbsp; has a parent (or grand parent, etc.) which has a specific aspect. I know how to check this point but I don't know how to get back the e</description>
      <pubDate>Fri, 10 May 2013 12:04:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-issue-get-all-parents-hierarchy/m-p/307242#M260372</guid>
      <dc:creator>axis18</dc:creator>
      <dc:date>2013-05-10T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMarker issue : get all parents hierarchy</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-issue-get-all-parents-hierarchy/m-p/307243#M260373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, this may seem a bit hard to achieve if you're new to Alfresco. It may seem a lot, but actually, it's easier than that &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But here goes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First, you don't need freemarker. You need client-side javascript. The document library is created by client side javascript. Check in your alfresco Share folder: &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/share/components/document-library&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;. There are scripts that do the actual loading and displaying of document library.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Second: this is a dynamic process. So, when you click on a folder, you will see a #path in the URL. If you also open up a network tab in the browser console (say Chrome -&amp;gt; rightclick -&amp;gt; Inspect element, then click Network), you will see that each time you click a folder, a request to the backend is made.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is your first point. Identify which backend (/alfresco) webscript is called (don't know by heart, I think it is GET /api/node/… something). Then modify that webscript so it also includes your information about the specific aspect in parents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So now you have extra info, but you also need to show this info.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For that, go back to client-side javascript file, and look for where it draws a datatable with results. You can check and add the special button there. (Check YUI 2 DataTable over at &lt;/SPAN&gt;&lt;A href="http://developer.yahoo.com/yui/datatable/" rel="nofollow noopener noreferrer"&gt;http://developer.yahoo.com/yui/datatable/&lt;/A&gt;&lt;SPAN&gt; for details).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a rough outline of what needs to be done, but I hope it helps. Ask more if you get stuck.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 21:43:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-issue-get-all-parents-hierarchy/m-p/307243#M260373</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-05-13T21:43:30Z</dc:date>
    </item>
  </channel>
</rss>

