cancel
Showing results for 
Search instead for 
Did you mean: 

Freemarker template and alfresco CMS

sirclueless
Champ in-the-making
Champ in-the-making
Hi,
I don`t know if it is the right place for my question (sorry):

I want to create a *.ftl file for a rendering template, to create an html document with alfresco nodes and with the data from the form.
But I can`t find a good tutorial or something that I understand how I can do it right. I don`t know what I have to do. I need an Instruction step by step to understand how is the right way.

Sorry for my bad english. I hope you have understand my problem and you can help me.

Thx
9 REPLIES 9

kevinr
Star Contributor
Star Contributor

sirclueless
Champ in-the-making
Champ in-the-making
That is my problem ! I know this page and this example but it doesn`t work or I don`t understand it. If I create a ftl file for the web-cms to render a form. I don`t know how it works and how I can access to alfresco notes.

I can work with ftl-files in alfresco DMS but not in the web-CMS. That`s my problem. Must I include something in the ftl-file or do something special that it works.

I hope you have understand my problem now 😕

Thx

kevinr
Star Contributor
Star Contributor
Ahh i see i didn't realise you meant templates for WCM Forms. I'll forward your query to our WCM form developer.

Thanks,

Kevin

sirclueless
Champ in-the-making
Champ in-the-making
Yes that is the problem . Thanks for your help and I hope to hear or get something that help me.

arielb
Champ in-the-making
Champ in-the-making
this page provides some information that should get you started:

http://wiki.alfresco.com/wiki/Forms_Developer_Guide

let me know if there is some feature you're looking for or information you need more detail on please.

sirclueless
Champ in-the-making
Champ in-the-making
Thanks for the help. I wanna render a form with freemarker and my idea is that in the output that was rendered with freemarker should be a symbol on the createt html-file. If I click on this symbol I get the alfresco login and if I login with correct rights to edit the form , I arrive at the form to edit which I click on the generated symbol. I hope you understand what I wanna do.
And a really good help is if I can see a complete ftl-file which create a html file from a form for a website.
My test Idea is I create a form for every website or use a form more times.
Then I have a index.jsp in that I include a header.html, the created body.html (from form) and a footer.html.  My structure consists of folders which have a index.jsp and the createt html-file from the form.

Maybe you can help me with a complete freemarker example.

sirclueless
Champ in-the-making
Champ in-the-making
And are there more variables and functions for the rendering engine freemarker?? I mean are there variables and functions to get the nodes or all  html files in a folder? I mean are there functions like the fremarker functions I can use in the DMS of alfresco???

arielb
Champ in-the-making
Champ in-the-making
there aren't any more freemarker examples at the moment other than the ones distributed with the product.  the approach i'd recommend is to have the freemarker template you are using for your form include the header and footer html pages, rather than aggregatte them later.  if you want to aggregate content, use parseXMLDocuments - this will provide the xml content you entered in the other forms and you can iterate that within your template.

sirclueless
Champ in-the-making
Champ in-the-making
Okay ! And is there a function to get all folder in a folder??? And the other question is, how get I a link to a document that was createt by form that I get to the form if I have the correct rights! I think it`s easier for a user to klick a little symbol on a website to change or edit the content that was create by a form. I hope you understand what I mean and you can help me with my idea!!
And can you give me an example how I can use the methode parseXMLDocument(String virtualPath) or the methode parseXMLDocuments(String formName, String virtualPath). I mean how I use it and how I get access to the list if I use FreeMarker !!!

Thank you for your help.