05-01-2007 10:10 AM
08-07-2007 06:02 AM
06-13-2008 05:01 PM
06-14-2008 02:30 AM
06-16-2008 10:44 AM
<#– Displays the contents of readme.html and/or the evaluated readme.ftl if they exist in the current space. –>
<#assign htmlFilename = "readme.html"/>
<#assign ftlFilename = "readme.ftl"/>
<#if space?exists>
<#if space.childByNamePath["${htmlFilename}"]?exists>
${space.childByNamePath[htmlFilename].content}
</#if>
<#if space.childByNamePath["${ftlFilename}"]?exists>
<#include space.childByNamePath["${ftlFilename}"].nodeRef>
</#if>
</#if>
06-19-2008 10:54 AM
<#assign ftlFilename = "navglobal01.ftl"/>
<#assign htmlFilename = "navglobal01.htm"/>
<#if space?exists>
<#if space.childByNamePath["${htmlFilename}"]?exists>
${space.childByNamePath[htmlFilename].content}
</#if>
<#if space.childByNamePath["${ftlFilename}"]?exists>
<#include space.childByNamePath["${ftlFilename}"].nodeRef>
</#if>
</#if>07-03-2008 01:53 PM
Here's an example of how to do it:
<#assign FTLfilename = "readme.ftl"/>
<#include space.childByNamePath["${FTLfilename}"].nodeRef>
In this case the readme.ftl is obviously in the current space context.
09-03-2008 11:42 AM
Here is an example of how to use an include. Keep in mind that you are working out of a repository.<#– Displays the contents of readme.html and/or the evaluated readme.ftl if they exist in the current space. –>
<#assign htmlFilename = "readme.html"/>
<#assign ftlFilename = "readme.ftl"/>
<#if space?exists>
<#if space.childByNamePath["${htmlFilename}"]?exists>
${space.childByNamePath[htmlFilename].content}
</#if>
<#if space.childByNamePath["${ftlFilename}"]?exists>
<#include space.childByNamePath["${ftlFilename}"].nodeRef>
</#if>
</#if>
<#function loadNodeID nodeID>
<#list companyhome.childrenByLuceneSearch["ID:workspace\\:\\/\\/SpacesStore\\/" + nodeID] as node>
<#return node>
</#list>
</#function>
<#assign freeMarkerTemplate = loadNodeID(freeMarkerTemplateID)>
${freeMarkerTemplate.nodeRef}<p>
<#include freeMarkerTemplate.nodeRef>
Message: Error during processing of the template 'Error reading included file workspace://SpacesStore/52d1a9e5-bc4a-4ef3-826d-229fa1fa209a'. Please contact your system administrator.
Exception: java.io.FileNotFoundException - Template workspace://SpacesStore/52d1a9e5-bc4a-4ef3-826d-229fa1fa209a not found.
09-04-2008 06:08 AM
02-11-2009 11:16 AM
<#assign ftlFile = companyhome.nodeByReference["${nodeRef}"].nodeRef>
<#include ftlFile>Exception: java.io.FileNotFoundException - Template workspace://SpacesStore/ec02892c-9cfa-410c-b6f4-b8b3a6f1ce2d not found.
freemarker.template.Configuration.getTemplate(Configuration.java:489)
freemarker.core.Environment.getTemplateForInclusion(Environment.java:1357)
freemarker.core.Include.accept(Include.java:143)
freemarker.core.Environment.visit(Environment.java:196)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:196)
freemarker.core.Environment.process(Environment.java:176)
freemarker.template.Template.process(Template.java:232)
org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)
org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:396)
org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:268)
org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:174)
org.alfresco.web.scripts.WebScriptRuntime.wrappedExecute(WebScriptRuntime.java:364)
org.alfresco.web.scripts.WebScriptRuntime$1.execute(WebScriptRuntime.java:330)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)
org.alfresco.web.scripts.WebScriptRuntime.transactionedExecute(WebScriptRuntime.java:341)
org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:284)
org.alfresco.web.scripts.WebScriptRuntime.executeScript(WebScriptRuntime.java:150)
org.alfresco.web.scripts.WebScriptServlet.service(WebScriptServlet.java:109)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595) 04-28-2009 09:49 PM
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.