AnsweredAssumed Answered

Include external flt into an ftl rendition template

Question asked by f.gandini on Oct 31, 2008
Hi all,
I'm encountering a little bit problem with freemarker "include" directive.
I have freemarker rendition template associate to a web form.
In this template I would like to include an ftl file that is external to the web form.

File to include is in Company Home > Data Dictionary > My Common Template Folder

In my template I try this code:

<#assign FLTFile= companyhome.childByNamePath["Data Dictionary/My Common Template Folder/includedFile.ftl"] > 
<#include FLTFile.nodeRef>

but i got the error below:

freemarker.template.TemplateModelException: Cannot perform an XPath query against an empty node set.

I tried also this syntax:

<#assign includedFile=companyhome.childrenByXPath["*[@cm:name='Data Dictionary']/*[@cm:name='My Common Template Folder']/includedFile.ftl"]>

but I got the same error.

It seems that from an ftl template associate to a webform is impossible to access to "companyhome". It's correct?

Thanks a lot in advance

Regards,
Fabio

Outcomes