PHPackages                             stefanobalocco/neartal - 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/neartal

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

stefanobalocco/neartal
======================

PHP HTML5 template engine losely based on TAL specification

04PHP

Since Jan 8Pushed 12y ago1 watchersCompare

[ Source](https://github.com/StefanoBalocco/NearTAL)[ Packagist](https://packagist.org/packages/stefanobalocco/neartal)[ RSS](/packages/stefanobalocco-neartal/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

NearTAL
=======

[](#neartal)

A php template engine based on TAL, an attribute-based template engine. This version is a fork from my previous project "SmallTAL", and utilize data- attributes to allow the templates to be html5 complaint.

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/neartal source was modified after the template compilation, the library recompile the template into php code. The template engine uses a personal fork of the ganon html5 parser ( ).

It's licensed under a BSD-like license.

Using
-----

[](#using)

To use NearTAL 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( 'NearTAL.php' ); $data\_required\_by\_the\_template = array ( 'variabile' =&gt; 'a value', 'arrayVariable' =&gt; array ( 'some data', 'some other data' ) ); $nearTALpaths = array ( 'temp' =&gt; '/path/to/temp/directory', 'template' =&gt; '/path/to/the/template/directory', 'cache' =&gt; '/path/where/cache/file/will/be/stored' );

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

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

You can look the NearTAL.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

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

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 (8 commits)")

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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