06-16-2017 05:39 AM
Hi,
I'm quite new to Alfresco. I've googled a lot about it, but I have not found the missing detail to make it work.
I'm triying to use Alfresco Community edition for creating a Word document with some dynamic content (properties values and some logic to include or not some paragraphs).
I've done all steps below from share, nothing by programming.
1) I've created a custom content model, a new type with two mandatory properties. No aspects.
2) I've created a template in data dictionary/node templates, a "FTL" file, and assigned it to the custom type in (1). Mime type plain text. I've tried different contents for the template, variations in its sintax, and copying fragments from some sample templates in data dictionary/Presentation templates.
3) I've created a folder in a site, and a rule to convert doccuments to Word Docx when they are modified.
4) I've created a new document from template.
5) I modify the custom properties of (4).
6) Only after (5), the custom rule copies the document to Word format.
Problems and questions:
- The template content is just copied, without changes nor variable substitution. As if Freemarker was not executed.
- In (2) and (5), I've seen the "all properties" button doesn't show any more standard properties (like MIME type, labels...).
- What's the correct syntax for using properties in the template? Not sure about escaping ":" after namespace.
Thank you in advance.
Oscar
06-16-2017 07:17 AM
please share at least the template so we can figure out if the problem is in there.
06-16-2017 08:13 AM
Hi Markus,
Thank you for your time.
These are some fragments from different, independant tests I've done:
<H1>Titulo</h1>
Hola ${demo2\:NombreCliente}
...
<h3>${message("templates.general_example.example_template_start")}</h3><b>${message("templates.general_example.company_home_space")}</b> ${companyhome.properties.name}
...
<H1>Titulo</h1>Hola
${NombreCliente}
...
<#list ["foo", "bar", "baz"] as x>
${x}
</#list>
I didn't get error messages, only the same input text as output.
Explore our Alfresco products with the links below. Use labels to filter content by product module.