<?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 Re: getting node path from freemarker template in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47831#M27214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I put this template under the Data Dictionary/Presentation Templates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then try to run it using the "Preview in Template" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;companyhome.nodeByReference[noderef] works only if the noderef string is hardcoded. But if a variable is used as it is in the code I sent in my previous post, it gives an error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THIS WORKS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${companyhome.nodeByReference[workspace://SpacesStore/842895bc-a7d0-11db-b30d-3356f174291a]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THIS DOES NOT WORK:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign x=t.methodArgumentsAsStrings[0]&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${companyhome.nodeByReference[x].displayPath}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jan 2007 14:07:01 GMT</pubDate>
    <dc:creator>kerem</dc:creator>
    <dc:date>2007-01-22T14:07:01Z</dc:date>
    <item>
      <title>getting node path from freemarker template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47829#M27212</link>
      <description>hi! In the freemarker template, I want to get the path of noderef by using the following code.&amp;nbsp; &amp;lt;#if document?exists&amp;gt;&amp;nbsp; &amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Node Path&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;#list document.auditTrail as t&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if t.auditMethod="moveNode"&amp;gt;</description>
      <pubDate>Wed, 17 Jan 2007 10:25:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47829#M27212</guid>
      <dc:creator>kerem</dc:creator>
      <dc:date>2007-01-17T10:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: getting node path from freemarker template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47830#M27213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't see anything obviously wrong with the FreeMarker elements - did you get this to work at all? Where are you calling the freemarker from - i assume it's not part of a workflow script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 12:50:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47830#M27213</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-01-22T12:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: getting node path from freemarker template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47831#M27214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I put this template under the Data Dictionary/Presentation Templates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then try to run it using the "Preview in Template" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;companyhome.nodeByReference[noderef] works only if the noderef string is hardcoded. But if a variable is used as it is in the code I sent in my previous post, it gives an error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THIS WORKS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${companyhome.nodeByReference[workspace://SpacesStore/842895bc-a7d0-11db-b30d-3356f174291a]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THIS DOES NOT WORK:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign x=t.methodArgumentsAsStrings[0]&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${companyhome.nodeByReference[x].displayPath}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 14:07:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-node-path-from-freemarker-template/m-p/47831#M27214</guid>
      <dc:creator>kerem</dc:creator>
      <dc:date>2007-01-22T14:07:01Z</dc:date>
    </item>
  </channel>
</rss>

