cancel
Showing results for 
Search instead for 
Did you mean: 

java.io.FileNotFoundException on <#include 'file&

jacqueswvdh
Champ in-the-making
Champ in-the-making
Hi all,
I am using alfresco 2.1
I want to include the content of a node in another file:

<#assign spaceref="${url.serviceContext}/api/node/content/${newsNode.nodeRef.storeRef.protocol}/${newsNode.nodeRef.storeRef.identifier}/${newsNode.nodeRef.id}">
<#include "${spaceref}/${newsNode.name?url}">

This leads to a java.io.FileNotFoundException.
If I use the same string for a href, the link works fine and displays the content.

<a href="${spaceref}/${newsNode.name?url}">content</a>

What is wrong with the include?
Kinds regards, Jacques
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
The FreeMarker 'include' directive does not understand the Alfresco syntax that references the node you want to include. I think the include directive is only really used to include other FreeMarker templates at load time. You can display node content within the template using the  ${newsNode.content}  api call. Does that do what you want?

Thanks,

Kevin

jacqueswvdh
Champ in-the-making
Champ in-the-making
Thanks Kevin,
That is indeed what I was looking for.
Jacques
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.