title: Can a node.processTemplate ftl use the include command?
body: <p>I am trying to use a simple <strong>&lt;#include "anotherFile.ftl"/></strong> inside of a freemarker template that is being processed using the Javascript API's method proccessTemplate (<a href="http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Transformation_API" rel="nofollow">http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Transformation_API</a>) against a particular node.</p>
  
  <p>It doesn't seem to like includes?!</p>
  
  <p>The error message is as follows</p>
  
  <blockquote>
    <p>Wrapped Exception (with status template): 04305890 Failed to execute
    script
    'classpath*:alfresco/extension/templates/webscripts/myPath/myWebscript.get.js':
    04305889 Error during processing of the template 'Error reading
    included file string://fooy/foo.ftl'. Please contact your system
    administrator.</p>
  </blockquote>
  
  <p>The template that is being processed and the potential one to be included will be stored outside of Alfresco's repository, but for now it's inside there.
  The webscripts will also be outside of the repository and inside a Java class path.</p>
  
  <p>I have tried to include the ftl even if it's inside the same directory, and this doesn't work.  I have tried to get a node.nodeRef (with success) but the actual include does not work, though this would mean storing the ftl in the repository which we will not be doing anyway.</p>
  
  <p>I did try to include the ftl on the actual webscripts freemarker itself but of course the node.processTemplate happens in the javascript controller before it gets passed to the webscript freemarker template</p>
  
  <p>I even tried to hardcode the contents of the include and pass it in the args associative array, and as expected it didn't work.</p>
  
  <p>Further investigation suggests this is a bug
  <a href="https://issues.alfresco.com/jira/browse/ALFCOM-3364" rel="nofollow">https://issues.alfresco.com/jira/browse/ALFCOM-3364</a></p>
  
  <p>Any other suggestions welcome if anyone has overcome this.</p>
  
  <p>Thanks</p>