Overview
ATal is a templating engine for PHP 5.3+.
Atal is inspired to PHPTAL but solves the problem in a more modern way.
Installation¶
Checkout from SVN the following projects http://svn.mercuriosistemi.com/goetas/atal/branches/2.0/ (atal)http://svn.mercuriosistemi.com/goetas/pluginsys/trunk/ (dependency that manages all pluigns)http://svn.mercuriosistemi.com/goetas/xmldom/branches/2.0/ (dependency that manages XML parsing)
If the system asks some credentials, use:
Username: Anonymous
Password: (empty)
Download a complete zip package
Download the package and happy coding!
Example¶
php
1 require "atal/autoload.php";
2 require "pluginsys/autoload.php";
3 require "xmldom/autoload.php";
4
5 $tal = new \goetas\atal\ATalXHTML();
6
7 $tal->setCompileDir('.');
8
9 $tal->variabile = "hello";
10
11 echo $tal->get("template_atal.html");
template
1
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 <html xmlns:t="ATal" xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
4 <head>
5 <title>ATal</title>
6 </head>
7 <body>
8 <div t:foreach="range(0,100) as $i" t:attr="$i%3==0?style='color:red'">
9 <span t:if="$i%2==0">
10 <p t:content="$variabile">world</p>
11 </span>
12 <span t:if="$i%2!=0">
13 <p t:content="$i">999</p>
14 </span>
15 </body>
16 </html>
17
Look here a more powerful example¶
Members
Sviluppatore: Asmir Mustafic
Cliente: anny anny, arena arena, belanger belanger, friulia friulia, ietri ietri, immobinetagenzie immobinetagenzie, intras intras, jupiter jupiter, lignanomare lignanomare, luciana luciana, sabina sabina, Savoia Immobiliare, sud sud, teghil teghil, valparaiso valparaiso, waltertour waltertour