cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Variables in Nuxeo Document Templates

catherine_
Champ on-the-rise
Champ on-the-rise

I am using Nuxeo 5.6 RC2 for document templating. I made a custom schema to use the variables in document template.

I did the following:

  1. Created a custom schema,"template" with prefix "tem" and registered.

< extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
< schema name="template" prefix="tem" src="data/schemas/template.xsd"/> < /extension> `

  1. Extended it to the "Document

    < extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
    < doctype name="template" extends="Document">
    < schema name="template"/>
    < schema name="dublincore"/>
    < schema name="common"/>
    < schema name="uid"/>
    < schema name="file"/>
    < facet name="Downloadable"/>
    < facet name="Versionable"/>
    < facet name="HasRelatedText"/> < /doctype> < /extension>

  2. Created screens to store custom schema,property(e.g tem:prop).I am successfully able to store the values.Hence,this confirms that my schema registration and value storage is fine.

  3. i use the variable in the document template like this:

    <#list This as doc> ${doc["tem:prop"]}" < /#list>

But this gives me the exception of unknown property ,"tem:prop"

If i access any dublin core schema variable,it works fine.But the custom schema extending Document is not accessed.

Can someone please guide me that the document templating in Nuxeo 5.6 RC2 can be used with dublin core schema only or i have missed something.? Please help

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

Use ${doc.template.prop} to access properties in FTL.

Although `${doc["tem

Getting started

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.