PHPackages                             stefanobalocco/smalltal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. stefanobalocco/smalltal

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

stefanobalocco/smalltal
=======================

A (basic|simple) PHP implementation of the ZOPE Template Attribute Language

05PHP

Since Jan 8Pushed 12y ago1 watchersCompare

[ Source](https://github.com/StefanoBalocco/SmallTAL)[ Packagist](https://packagist.org/packages/stefanobalocco/smalltal)[ RSS](/packages/stefanobalocco-smalltal/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

SmallTAL
========

[](#smalltal)

A php template engine based on TAL, an attribute-based template engine.

There is at least two other php tal implementation (PHPTAL, for example), but this implementation was written thinking about size and speed; tal templates are converted into php code (without the inner data), allowing to reuse them without the need of future conversion. Each time a template is requested, if the template/metal file/smalltal source was modified after the template compilation, the library recompile the template into php code. The template engine isn't an html parser/beautifier, so won't correct your template.

It's licensed under a BSD-like license.

Using
-----

[](#using)

To use SmallTAL you need to do:

1. Create a temp directory, a cache directory and a template directory
2. Template directory should have this structure: | Templates +-- TemplateName.metal.html &lt; macros for the template +--| TemplateName +-- PageName.html
3. Use the library in your project, for example:

include( 'SmallTAL.php' ); $data\_required\_by\_the\_template = array ( 'variabile' =&gt; 'a value', 'arrayVariable' =&gt; array ( 'some data', 'some other data' ) ); $smallTALpaths = array ( 'temp' =&gt; '/path/to/temp/directory', 'template' =&gt; '/path/to/the/template/directory', 'cache' =&gt; '/path/where/cache/file/will/be/stored' );

$returnValue = SmallTAL( "TemplateName", "PageName", $data\_required\_by\_the\_template, $smallTALpaths );

If you want to obtain the template in a variable, you should use ob\_start()/ob\_get\_clean().

You can look the SmallTAL.Tests.php (it's a PHPUnit test case) file and/or the tests folder.

Unsupported TAL/TALES features
------------------------------

[](#unsupported-taltales-features)

This is a minimal TAL template engine, optional features isn't supported. Also on-error isn't supported.

Usefull links
-------------

[](#usefull-links)

TAL specification: TALES specification: METAL specification: Owlfish TAL, TALES and METAL reference:

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1469044?v=4)[Stefano Balocco](/maintainers/stefanobalocco)[@StefanoBalocco](https://github.com/StefanoBalocco)

---

Top Contributors

[![StefanoBalocco](https://avatars.githubusercontent.com/u/1469044?v=4)](https://github.com/StefanoBalocco "StefanoBalocco (1 commits)")

### Embed Badge

![Health badge](/badges/stefanobalocco-smalltal/health.svg)

```
[![Health](https://phpackages.com/badges/stefanobalocco-smalltal/health.svg)](https://phpackages.com/packages/stefanobalocco-smalltal)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
