Book Image

Alfresco 3 Cookbook

Book Image

Alfresco 3 Cookbook

Overview of this book

Alfresco is the renowned and multiple award winning open source Enterprise content management system which allows you to build, design, and implement your very own ECM solutions.You have read a number of tutorials, blogs, and books on Alfresco. Now you're in the real world, trying to use Alfresco, but you’re running into problems with it. This is the book you want. Packed full of solutions that can be instantly applied, this cookbook with its practical based recipes and minimal explanation meets that demand.This Alfresco 3 cookbook boasts a comprehensive selection of recipes covering everything from the basics to the advanced. The book has recipes for quickly installing Alfresco in Windows and Linux and helping you use custom content model, rules, and search. There is also a collection of recipes focused on creating Scripts, Freemarker templates, Web Scripts, and new workflow definitions. Steps to integrate Alfresco with other systems like MS-Office are also included. You will be able to use Alfresco’s File and Email servers. Finally, step-by-step recipes are presented to create an Alfresco build environment and compile the source code. This Alfresco 3 Cookbook is perfect for developers looking to start working on Alfresco quickly, gain complete understanding, write custom implementations, and achieve expertise very easily.
Table of Contents (21 chapters)
Alfresco 3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


A template is a document that can be applied on a data object to produce another document. Thus templates are used to present data or content in different styles and formats.

A typical template engine works in the following way:

The template engine accepts both data and the template, and a new document is generated and returned as per the template provided.

For example, an XML document can be used as data, and an XSLT document works as the template—this generates a new document that can be in HTML or Word format.

There are quite a few template engines available. XSLT is probably the most popularly used. Other engines are like FreeMarker templates, Velocity templates, and so on. Alfresco uses FreeMarker as the default template engine.

FreeMarker templates in Alfresco

Consider the following model:

At first, a content item is passed as the data before a FreeMarker template is created and then finally a formatted document is produced. If the document passed is with the name About Infoaxon...