PHPackages                             halaxa/zf2-latte - 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. halaxa/zf2-latte

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

halaxa/zf2-latte
================

Zf2 module for Latte templating engine integration

325PHP

Since May 13Pushed 11y ago3 watchersCompare

[ Source](https://github.com/halaxa/zf2-latte)[ Packagist](https://packagist.org/packages/halaxa/zf2-latte)[ RSS](/packages/halaxa-zf2-latte/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/bc302b88c5acb46ff38e39b61e87907ec94083fab8d6fb548fb52451f46e207a/68747470733a2f2f7472617669732d63692e6f72672f68616c6178612f7a66322d6c617474652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/halaxa/zf2-latte)

Latte integration module to Zend Framework 2
============================================

[](#latte-integration-module-to-zend-framework-2)

[Latte](https://github.com/nette/latte) is state of the art templating system, part of [Nette framework](https://github.com/nette/nette), leaving others behind mainly in powerful XSS defence.

Work in progress
----------------

[](#work-in-progress)

This is not a stable solution yet. Feel free to participate on development:)

What it does
------------

[](#what-it-does)

Basic latte support works. Zend view helpers work by accessing `$helper` object in template.

```
{$helper->headScript()} {* will be printed and escaped *}
{?$helper->headScript()} {* will not be printed *}
```

Layouts work. It by default disables native layout in ZF, as Latte has great and simple support for them, also supporting multiple layouts depending on template. If you still want to use default ZF layout system in some actions, you can. It disables is only if latte template is active template.

Translation macro `{_}` is configurable via ['translator\_callback'](https://github.com/halaxa/zf2-latte/blob/master/config/module.config.php#L26) key.

Loads `template_map` and `template_path_stack`.

Supports `n:href` which maps to `$helper->url()`. Can be used like this even if you use PHP without short array syntax \[\]:

```
link
```

What it does not (yet)
----------------------

[](#what-it-does-not-yet)

Macros like `control`, `form` and similar are not present, as they are based on Nette internal components.

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

[](#installation)

This is [composer](http://getcomposer.org) package. For **library instalation** include into your `composer.json` following line

```
"require": {
    "halaxa/zf2-latte": "dev-master"
}
```

For **development installation** and running tests you can do something like:

```
composer create-project halaxa/zf2-latte zf2-latte dev-master --prefer-source --no-install --keep-vcs
cd zf2-latte
composer install --prefer-dist --dev
./vendor/bin/tester test/tests
```

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

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://www.gravatar.com/avatar/53441e14080addfd973c24f5d358cb319b1c500f39b50628e5c1ed16ded5294c?d=identicon)[halaxa](/maintainers/halaxa)

---

Top Contributors

[![halaxa](https://avatars.githubusercontent.com/u/2226505?v=4)](https://github.com/halaxa "halaxa (37 commits)")

### Embed Badge

![Health badge](/badges/halaxa-zf2-latte/health.svg)

```
[![Health](https://phpackages.com/badges/halaxa-zf2-latte/health.svg)](https://phpackages.com/packages/halaxa-zf2-latte)
```

###  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)
