cancel
Showing results for 
Search instead for 
Did you mean: 

Pass variable values from js controller to freemarker

robinho
Champ in-the-making
Champ in-the-making
can anybody tell me what am I doing wrong?

I want to retrieve all my alfresco sites with this code (this should work):

 model.sites = siteService.listSites(null, null, 0); ‍

return type=
 List<Site>  ‍

So now I want to retrieve this list model.sites in my HTML freemarker template like this:

 <body> ${sites} </body> ‍


How can I view this sites list. I know i am getting it wrong in my ftl, but can't find a solution how to retrieve it.

thank you
1 REPLY 1

abarisone
Star Contributor
Star Contributor
Hi,
since
List<Site>‍
is a list, you have to iterate over it, as explained here http://freemarker.org/docs/ref_directive_list.html

Rgeards,
Andrea