Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
JSF Component
The template component provides rendering of Template text files against a Model data using a pluggable templating system. See the Template Guide for more information on template files and data models.
See Also: Template Guide
Back to: Component Library
<string>'
rendered='<boolean>'
engine='<string>'
template='<string>' mandatory
model='<method-binding>'
/>
Alfresco 2.0 Tag Details:
<string>'
rendered='<boolean>'
engine='<string>'
template='<string>'
templatePath='<string>'
model='<method-binding>'
/>
The identifier of the templating engine to use. These come from the web-client-config.xml definitions. If no engine is provided then the FreeMarker default engine will be used.
The location of the template text file. The template file can either be located on the ClassPath (e.g. in the folder alfresco/templates under WEB-INF/classes for a TomCat installation) or in the Repository.
-Available in Alfresco 2.0' - The cm:name based path to the template to render. For example '/Company Home/Data Dictionary/Presentation Templates/my_docs.ftl'.
The model to process the template file against. If no model is provided then the default will be used. Information on the default model and providing custom models can be found here in the Template Guide.
Example showing the template component using the default model and a template file on the classpath:
<r:template template='alfresco/templates/example.flt' />
Example showing the template component using a custom model and a template file from the repository:
<r:template template='#{MyBean.templateNodeRef}' model='#{MyBean.templateModel}' />
See the Template Guide examples.