In my past projects most of the times alfresco being used in backend to store contents and front end is built using portal or other web application now whenever this kind of architecture exist there is going to be requirement where we need to expose alfresco repository to front-end system. Most of the times when we pull alfresco contents from alfresco repository through webscript based on some business logic we get list of nodeRefs or nodes.
For extracting information from this list of nodes we have two options
2) Pass list of nodes directly to ftl file and iterate through those nodes in ftl
Now whenever we are having list of noderef we need to extract set of properties from those nodes, Most of the times we have to deal with out-of-box properties as well as custom properties.
Here is a piece of code which you can use to iterate through all those properties in ftl file.
Summary: Above piece you can inject in your ftl files and it is generic enough to be reusable across different output formats.
- See more at: http://blog.arvixe.com/iterate-node-properties-in-alfresco-freemarker-file/#sthash.lYSfCnEL.dpuf