.. contents:: :depth: 2

Introduction
============

Easy Template (collective.easytemplate) products brings easy dynamic texts to Plone. 
You don't need to create full blown product just for few dynamic pages anymore - 
the most simplest things can be typed straight from the visual editor.

Templating is a way to add simple programming logic to text output. 
This products adds or enhances templating supports on various parts
of Plone site.

Read more about this solution in this `blog entry <http://blog.twinapex.fi/2009/07/30/putting-views-like-sitemap-into-plone-content-tree-using-easy-template-add-on/>`_.

Motivation 
----------

Plone lacks out of the box support for custom, extensible, 
templating support for content editors.

Use cases
---------

Possible use cases are e.g.

* Use unfiltered HTML on page body (<script> et. al)

* Adding dynamic listings and tables on pages, like news listing

* Adding dynamic email bodies, titles and receivers in content rules actions

* Adding generated content to content rule action emails

* Show different text to logged in and anonymous users

* Creating a simple text portlet dynamically


Example
-------

The following example demostrates how text in Templated Document edit mode gets translated to generated HTML snippet in the view mode.

You write in Kupu::

  Hello user!
  
  Please select one course from below:
  
  {{ list_folder("courses") }}
 
will result to the output:

  Hello user!
  
  Please select one course from below:
  
  * `Math <http://example.example>`_
  
  * `Marketing <http://example.example>`_
  
  * `Chemistry <http://example.example>`_


Installation 
------------

Add to your buildout::

	eggs = 
		collective.easytemplate
		
	zcml = 
		collective.easytemplate
	
Run Add-on product installer for *Easy Template* product.

collective.easytemplate depends on `collective.templateengines <http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=collective.templateengines>`_
and `Jinja2 <http://pypi.python.org/pypi/Jinja2>`_ template engine. 

Security notice
----------------

Because collective.easytemplate allows entering unsafe HTML, like <script> on the pages by default,
its creation is limited to the users with Manager role. 

Running unit tests
------------------

Python eggs Cheetah, Jinja2 and Products.LinguaPlone must be installed in order to run all unit tests.
  
Authors
-------

`mFabrik Research Oy <mailto:info@mfabrik.com>`_ - Python and Plone professionals for hire.

* `mFabrik web site <http://mfabrik.com>`_ 

* `mFabrik mobile site <http://mfabrik.mobi>`_ 

* `Blog <http://blog.mfabrik.com>`_

* `More about Plone <http://mfabrik.com/technology/technologies/content-management-cms/plone>`_ 

Hans-Peter Locher [mr_savage]

Sponsorship
------------

The development of this product was sponsored by `London School of Marketing <http://londonschoolofmarketing.com>`_.




