<?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: #include directive in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83205#M55875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you saying that XSLT is easier and more flexible than Freemarker?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2007 09:45:15 GMT</pubDate>
    <dc:creator>davidc</dc:creator>
    <dc:date>2007-08-06T09:45:15Z</dc:date>
    <item>
      <title>#include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83197#M55867</link>
      <description>I can't, for the life of me, get the #include directive to work within a freemarker "Presentation Template"Does anyone know if it is supported or what the "file name" is supposed to look like.&amp;nbsp; I have tried as many configurations of the filename that I can think of and continually get "FileNotFound"</description>
      <pubDate>Tue, 01 May 2007 14:10:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83197#M55867</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2007-05-01T14:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83198#M55868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I can't, for the life of me, get the #include directive to work within a freemarker "Presentation Template"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;see this forum thread for more information: &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=6111&amp;amp;highlight=include" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=6111&amp;amp;highlight=include&lt;/A&gt;&lt;SPAN&gt; and especially this JIRA issue: &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/browse/WCM-399" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/WCM-399&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edgar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 14:54:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83198#M55868</guid>
      <dc:creator>edgar</dc:creator>
      <dc:date>2007-05-02T14:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83199#M55869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your response Edgar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't see a way for it to work.&amp;nbsp; The file I am trying to reference is another ftl in the repository.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So let me show you what I am doing….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a header.ftl that needs to be included in the top of another ftl file.&amp;nbsp; I can access the header.ftl with the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;#assign header = companyhome.childByNamePath["Data Dictionary/Presentation Templates/RoofHeatTemplates/header.ftl"]&amp;nbsp; &amp;gt;&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;That gives me access to the file node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then need to run a&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#include "header.ftl" &amp;gt;&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; in the main ftl file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that whatever I put in for the path name to the header.ftl, it doesn't find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried: ${header.nodeRef}, ${header.url} and ${header.displayPath}, each one gives me an error.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example ${header.nodeRef} gives the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;org.alfresco.error.AlfrescoRuntimeException: Error during template servlet processing: Error during processing of the template 'Error reading included file workspace://SpacesStore/90568487-f768-11db-a73d-7b34ccb063d2/header.ftl'. Please contact your system administrator.&lt;BR /&gt;caused by:&lt;BR /&gt;org.alfresco.service.cmr.repository.TemplateException: Error during processing of the template 'Error reading included file workspace://SpacesStore/90568487-f768-11db-a73d-7b34ccb063d2/header.ftl'. Please contact your system administrator.&lt;BR /&gt;caused by:&lt;BR /&gt;freemarker.template.TemplateException: Error reading included file workspace://SpacesStore/90568487-f768-11db-a73d-7b34ccb063d2/header.ftl&lt;BR /&gt;caused by:&lt;BR /&gt;java.io.FileNotFoundException: Template workspace://SpacesStore/90568487-f768-11db-a73d-7b34ccb063d2/header.ftl not found.&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The unit test only show the included templets sitting in the filesystem, not in the repository.&amp;nbsp; Also, I am not using the AVM, just strictly alfrescos web-client Template Processor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 17:48:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83199#M55869</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2007-05-02T17:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83200#M55870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example of how to do it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign FTLfilename = "readme.ftl"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#include space.childByNamePath["${FTLfilename}"].nodeRef&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case the readme.ftl is obviously in the current space context.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 11:38:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83200#M55870</guid>
      <dc:creator>mikef</dc:creator>
      <dc:date>2007-05-03T11:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83201#M55871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;PERFECT!!!&amp;nbsp; Thank you so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was doing a screwed up syntax of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign FLTFile= companyhome.childByNamePath["file.ftl"]&amp;nbsp; &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#include "${FLTFile.nodeRef}" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of the proper syntax of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#include FLTFile.nodeRef &amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 15:35:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83201#M55871</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2007-05-03T15:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83202#M55872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I also use constructs like companyhome.childByNamePath in my XSL templates? If so: is there an example of this somewhere? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Template_Guide" rel="nofollow noopener noreferrer"&gt;Template Guide&lt;/A&gt;&lt;SPAN&gt; seems to be geared towards Freemarker instead of XSLT?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edgar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 21:08:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83202#M55872</guid>
      <dc:creator>edgar</dc:creator>
      <dc:date>2007-05-03T21:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83203#M55873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, the model available in XSL is very different to the rich freemarker model - however we are working towards a common model.&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>Fri, 04 May 2007 12:52:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83203#M55873</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-05-04T12:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83204#M55874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it just me or is managing the Freemarker data model and transformations SO much simpler and more flexible than XSLT?&amp;nbsp; I am tasking myself to see if I can duplicate what I am doing in Freemarker to XSLT and I don't see ways to do things like the default model information shown at &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Template_Guide_For_Alfresco_1.4_and_2.0#Default_Model" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Template_Guide_For_Alfresco_1.4_and_2.0#Default_Model&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there ways to make companyhome, userhome, person, args, session, etc. etc. available in an xstl transformation?&amp;nbsp; More over, what about the items in the TemplateNode class and the ability to add our own HashMaps and beans that become available on the model.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to XSLT transformations but I am looking and looking for a way to make these items available to an XLST transformation and I beleive I am missing something.&amp;nbsp; As popular as it is, I can't beleive there is no way to do this.&amp;nbsp; The Freemarker manual describes very clearly and simply how to do it, I can find no such things for the XSLT model.&amp;nbsp; Is there a keyword or term they use I am missing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did look at the XSLTRenderingEngine class in alfresco and see an invokeMethod class but I don't see examples anywhere on how to use it.&amp;nbsp; Is there where you put all these custom methods?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry to ramble on for what may be a simple question, if anyone can simply point me in the right direction, I can figure it out….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 15:06:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83204#M55874</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2007-08-03T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83205#M55875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you saying that XSLT is easier and more flexible than Freemarker?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 09:45:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83205#M55875</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-08-06T09:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83206#M55876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, I am saying I understand Freemarker and how to expose all this extra data to it, but I do not see how to do it in XSLT.&amp;nbsp; In Freemarker, you simply tie a bean to the data model and it is available in the transformation.&amp;nbsp; Very simple.&amp;nbsp; But I would like to figure out how to expose beans in XSLT i.e. args, company_home, the TemplateNode class, my own Beans, etc. etc.&amp;nbsp; I assume XSLT can do the same things,&amp;nbsp; that is, somehow tie a javabean and expose it in the data model.&amp;nbsp; Am I right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been looking through quite a bit of XSLT information and it is not clear to me how to do it.&amp;nbsp; Maybe they have a completly different concept?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 14:51:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83206#M55876</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2007-08-06T14:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83207#M55877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;XSLT transforms XML documents.&amp;nbsp; So, it's not natural to provide arbitrary Javabeans as source data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Potentially, custom XSLT functions could be implemented and registered to perform this kind of binding, but this is really outside of XSLT's natural support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All I can suggest is to search the web to see if folks have attempted the same.&amp;nbsp; It's not an area I'm too familiar with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 10:02:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83207#M55877</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-08-07T10:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83208#M55878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are running 2.2 and I am now having problems with the freemarker include directive.&amp;nbsp; After many many tries and incarnations of trying to include a file, I've resorted to the most simple form I know.&amp;nbsp; Here is a snippet of the FTL file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign FTLfilename = "navglobal01.ftl"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#include "${FTLfilename}"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, after editing the desired asset I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please correct the errors below then click Finish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * error regenerating rendition using freemarker-include-file.ftl: freemarker.template.TemplateException: Error reading included file navglobal01.ftl&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;navglobal01.ftl resides in the same directory as the file including it, I'd prefer it to be in an /includes folder of it's own, but I am making this as simple as possible to begin with and I still can't get it to work.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 21:01:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83208#M55878</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2008-06-13T21:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83209#M55879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is that the complete message? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes the stacktrace in the error log/console has more useful info as to the cause of the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jun 2008 06:30:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83209#M55879</guid>
      <dc:creator>tommorris</dc:creator>
      <dc:date>2008-06-14T06:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83210#M55880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is an example of how to use an include.&amp;nbsp; Keep in mind that you are working out of a repository. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#– Displays the contents of readme.html and/or the evaluated readme.ftl if they exist in the current space. –&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;#assign htmlFilename = "readme.html"/&amp;gt;&lt;BR /&gt;&amp;lt;#assign ftlFilename = "readme.ftl"/&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;#if space?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${htmlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ${space.childByNamePath[htmlFilename].content}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${ftlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#include space.childByNamePath["${ftlFilename}"].nodeRef&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;BR /&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;/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;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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:44:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83210#M55880</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2008-06-16T14:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83211#M55881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I tried your suggestion and received this error after clicking next while editing a document:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please correct the errors below then click Finish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * error regenerating rendition using freemarker-include-file.ftl: freemarker.core.NonStringException: Error on line 44, column 11 in freemarker_template Expecting a string, date or number here, Expression space.childByNamePath[htmlFilename].content is instead a freemarker.ext.dom.NodeListModel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while using this in the ftl template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#assign ftlFilename = "navglobal01.ftl"/&amp;gt;&lt;BR /&gt;&amp;lt;#assign htmlFilename = "navglobal01.htm"/&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;#if space?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${htmlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ${space.childByNamePath[htmlFilename].content}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${ftlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#include space.childByNamePath["${ftlFilename}"].nodeRef&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;lt;/#if&amp;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it that "space" needs to be instantiated ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2008 14:54:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83211#M55881</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2008-06-19T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83212#M55882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here's an example of how to do it:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;#assign FTLfilename = "readme.ftl"/&amp;gt;&lt;BR /&gt;&amp;lt;#include space.childByNamePath["${FTLfilename}"].nodeRef&amp;gt;&lt;BR /&gt;&lt;BR /&gt;In this case the readme.ftl is obviously in the current space context.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried the above syntax for a freemarker include directive and got the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please correct the errors below then click Finish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Error generating rendition using freemarker-include-file.ftl: freemarker.core.NonStringException: Error on line 41, column 11 in freemarker_template&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Expecting a string, date or number here, Expression space.childByNamePath["${FTLfilename}"].nodeRef is instead a freemarker.ext.dom.NodeListModel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Alfresco 2.2, does anyone have any ideas as to how to solve this problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 17:53:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83212#M55882</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2008-07-03T17:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83213#M55883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is an example of how to use an include.&amp;nbsp; Keep in mind that you are working out of a repository. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#– Displays the contents of readme.html and/or the evaluated readme.ftl if they exist in the current space. –&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;#assign htmlFilename = "readme.html"/&amp;gt;&lt;BR /&gt;&amp;lt;#assign ftlFilename = "readme.ftl"/&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;#if space?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${htmlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ${space.childByNamePath[htmlFilename].content}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#if space.childByNamePath["${ftlFilename}"]?exists&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;#include space.childByNamePath["${ftlFilename}"].nodeRef&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;BR /&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;/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;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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I am just tryint to to something like that in a webscript. This is some shortened dummy code, showing the problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;#function loadNodeID nodeID&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;#list companyhome.childrenByLuceneSearch["ID:workspace\\:\\/\\/SpacesStore\\/" + nodeID] as node&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;#return node&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/#list&amp;gt;&lt;BR /&gt;&amp;lt;/#function&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;#assign freeMarkerTemplate = loadNodeID(freeMarkerTemplateID)&amp;gt;&lt;BR /&gt;${freeMarkerTemplate.nodeRef}&amp;lt;p&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;#include freeMarkerTemplate.nodeRef&amp;gt;&lt;BR /&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;/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;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;BR /&gt;&lt;SPAN&gt;While the nodeRef holds perfectly valid content, which is accessible via freeMarkerTemplate.content - I cannot use the include directive without getting this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Message:&amp;nbsp;&amp;nbsp;&amp;nbsp;Error during processing of the template 'Error reading included file workspace://SpacesStore/52d1a9e5-bc4a-4ef3-826d-229fa1fa209a'. Please contact your system administrator.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Exception:&amp;nbsp;&amp;nbsp;&amp;nbsp;java.io.FileNotFoundException - Template workspace://SpacesStore/52d1a9e5-bc4a-4ef3-826d-229fa1fa209a not found.&lt;BR /&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;How can the file not be found if it is there as I can read out of it? I am using Alfresco Labs v3… do I need to specify another path? I mean, the &lt;/SPAN&gt;&lt;A href="http://readme.html/readme.ftl" rel="nofollow noopener noreferrer"&gt;readme.html/readme.ftl&lt;/A&gt;&lt;SPAN&gt; example does not really look different to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2008 15:42:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83213#M55883</guid>
      <dc:creator>alr</dc:creator>
      <dc:date>2008-09-03T15:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83214#M55884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;me again, some more information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stupid question: Is it possible, that you can only #include other freemarker templates if they are inside the "Web Scripts" Directory?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had a web script in /Data Dictionary/Web Scripts/renderTemplate/ which used one of the below include directives (before that I always placed test.ftl into the right directory).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Works] &amp;lt;#include "test.ftl"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Works] &amp;lt;#include "../test.ftl"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[NOT WORKING] &amp;lt;#include "../../test.ftl"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last one did not work, as it gave me the "File not found" error, though it was psyically definately at the right place (I was only out of the Web Scripts directory).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, the new question is, how do I load templates inside of webscripts, which are placed in User Homes (though the readme exactly does exactly that or am I wrong)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any hints.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 10:08:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83214#M55884</guid>
      <dc:creator>alr</dc:creator>
      <dc:date>2008-09-04T10:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83215#M55885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you ever find a solution for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having a similar problem with the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#assign ftlFile = companyhome.nodeByReference["${nodeRef}"].nodeRef&amp;gt;&lt;BR /&gt;&amp;lt;#include ftlFile&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm getting file not found errors, though if I test the ftlFile variable (ie. without the include but just doing: ${ftlFile.content} for example, I can see the freemarker content that I want).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Exception:&amp;nbsp;&amp;nbsp;&amp;nbsp;java.io.FileNotFoundException - Template workspace://SpacesStore/ec02892c-9cfa-410c-b6f4-b8b3a6f1ce2d not found.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.template.Configuration.getTemplate(Configuration.java:489)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.Environment.getTemplateForInclusion(Environment.java:1357)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.Include.accept(Include.java:143)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.Environment.visit(Environment.java:196)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.MixedContent.accept(MixedContent.java:92)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.Environment.visit(Environment.java:196)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.core.Environment.process(Environment.java:176)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;freemarker.template.Template.process(Template.java:232)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:396)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:268)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:174)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptRuntime.wrappedExecute(WebScriptRuntime.java:364)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptRuntime$1.execute(WebScriptRuntime.java:330)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptRuntime.transactionedExecute(WebScriptRuntime.java:341)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:284)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptRuntime.executeScript(WebScriptRuntime.java:150)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.alfresco.web.scripts.WebScriptServlet.service(WebScriptServlet.java:109)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;javax.servlet.http.HttpServlet.service(HttpServlet.java:729)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;java.lang.Thread.run(Thread.java:595) &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;/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;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;/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;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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The file is definitely there because if I remove the include line and enter: ${ftlFile.content} I get the expected freemarker content.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've searched all through these forums but it doesn't appear that there's an answer…. I'm using a webscript to display some html content but the ftl template to use can vary depending on a number of variables (this is the ${nodeRef} variable. Do the templates to be included need to be in a specific place? Or can I call them from any location in the repository? And if so, how?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be great. Thanks Lee&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 16:16:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83215#M55885</guid>
      <dc:creator>lee</dc:creator>
      <dc:date>2009-02-11T16:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: #include directive</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83216#M55886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this functionality available in Alfresco Community 2.9.0B build 683?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&amp;nbsp; &amp;lt;#include companyhome.childByNamePath("Data Dictionary/Web Scripts/examples/test.html.ftl").nodeRef&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a webscript to process a freemarker template and write the content to a file node in alfresco.&amp;nbsp; The &amp;lt;#include&amp;gt; directive resolves to a valid nodeRef, but it throws a FileNotFoundException saying that the NodeRef cannot be found.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Here's what I'm getting for a response…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message: Failed to execute script 'workspace://SpacesStore//Company Home/Data Dictionary/Web Scripts/examples/publish.get.js': Failed to execute script 'workspace://SpacesStore//Company Home/Data Dictionary/Web Scripts/examples/publish.get.js': Wrapped org.alfresco.service.cmr.repository.TemplateException: Error during processing of the template 'Error reading included file workspace://SpacesStore/d1aa3ac7-a8ee-11dd-8d11-3d772ddcae37'. Please contact your system administrator. (AlfrescoScript#20)&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception: java.io.FileNotFoundException - Template workspace://SpacesStore/d1aa3ac7-a8ee-11dd-8d11-3d772ddcae37 not found.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 01:49:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/include-directive/m-p/83216#M55886</guid>
      <dc:creator>stevewickii</dc:creator>
      <dc:date>2009-04-29T01:49:53Z</dc:date>
    </item>
  </channel>
</rss>

