You are here

Template models

Template models provide data which can be used by the template to generate an output view.

Views are often generated from model data. A template always has access to default model data. The default model can have data added to it, for example from JavaScript controllers.

A model consists of a number of objects or hierarchy of objects from which a template file retrieves values that can be used to dynamically generate the output view. The model is like the API for the template page: it provides the objects from which properties and values can be accessed.

The repository provides a "default" model that is always available. The web script framework provides additional model objects relevant to processing output for Remote APIs. Programmatically, it is also possible to define a custom model that can be merged into the default model to provide additional model objects. Custom Java objects can be configured by using Spring to make them available to template models within the repository and/or the web script framework.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.