public
Description: Calypso - A PHP Port of the Django Template Engine
Homepage: http://www.beberlei.de/calypso/
Clone URL: git://github.com/beberlei/calypsodtl.git
name age message
file .gitignore Tue Nov 11 15:17:31 -0800 2008 gitignore file [beberlei]
file CHANGES Tue Nov 11 15:06:46 -0800 2008 Calypso DTL Initial Commit to Github [beberlei]
file LICENSE.txt Tue Nov 11 15:06:46 -0800 2008 Calypso DTL Initial Commit to Github [beberlei]
file README.txt Sat Nov 29 04:48:04 -0800 2008 README update with TODOS [beberlei]
directory demos/ Tue Nov 11 15:06:46 -0800 2008 Calypso DTL Initial Commit to Github [beberlei]
directory library/ Wed Nov 12 01:41:12 -0800 2008 Allow Object instances in Context (patch thanks... [beberlei]
directory tests/ Wed Nov 12 01:41:12 -0800 2008 Allow Object instances in Context (patch thanks... [beberlei]
Calypso Framework - Django Template Language

A PHP Django Template Language Rip-Off for the Zend_Framework
================================================
Author: Benjamin Eberlei (benny at whitewashing dot de)
License: BSD License

This is the first alpha/beta version of a PHP Template Engine
implementing the Django Template Engine as used by the
Python Framework Django. It can be also be used
as Standalone or within the Zend Framework View Interface.

Development TODOS
================================================
1. Escaping should be Charset/Encoding aware. Currently
htmlspecialchars is used deep inside the engine, which cannot be
configured.

2. it was reported that multiple inheritence templates don't work.

3. a general refactoring to allow intermediate parsing into PHP code
should be thought off to optimize the currently VERY VERY slow performance.

Features
================================================

It replicates almost all tags and filters currently and
passes many unit tests for all parts of the engine as described
under:

http://www.djangoproject.com/documentation/templates/

An extension has been implemented to allow the possibilty
to serve parts of the template by the Client via Javascript
and the DojoX DTL implementation. This works as follows:

{% ajax "csshook" "url" %}
..various dtl language statements here...
{% endajax %}

Puts the inner ajax block onto a Client DTL Stack which can then
be rendered as DojoX DTL Requests using:

{% dtlstack %}

The template will be hooked into "csshook" using context data
that has to be served from "url" via JSON.

=================
Using Calypso DTL
================

A full fleged demo is bundled with this release. See it for more information.

Currently Calypso_View_Dtl can only function with an Autoloading component
like the Zend_Loader since no require or includes are made throughout the
scripts. The component has to reside in the include path (use set_include_path()):

require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

$view = new Calypso_View_Dtl();
$view->assign('var', $var);
$view->var = $var;
echo $view->render('dtltemplate.tpl');