PHPackages                             phpixie/template - 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. phpixie/template

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

phpixie/template
================

Templating library for PHPixie

3.2.4(8y ago)321.7k44BSD-3-ClausePHP

Since Oct 11Pushed 8y ago3 watchersCompare

[ Source](https://github.com/PHPixie/Template)[ Packagist](https://packagist.org/packages/phpixie/template)[ Docs](http://phpixie.com)[ RSS](/packages/phpixie-template/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (10)Used By (4)

Template
========

[](#template)

[![Build Status](https://camo.githubusercontent.com/8516eefce659c0da82d263fd84d82e254b50e4f7ec22a0f1ebbc129b9d352c2a/68747470733a2f2f7472617669732d63692e6f72672f504850697869652f54656d706c6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PHPixie/Template)[![Test Coverage](https://camo.githubusercontent.com/9d3885c246b84101adbd778db9fdea5214dedcb71caf1f07a56eed423aa7fa4a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f504850697869652f54656d706c6174652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/PHPixie/Template)[![Code Climate](https://camo.githubusercontent.com/c47c6f3bc052d24dff0dca75dce6339d32ef99be946fdfbff959041a2b02a534/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f504850697869652f54656d706c6174652f6261646765732f6770612e737667)](https://codeclimate.com/github/PHPixie/Template)[![HHVM Status](https://camo.githubusercontent.com/a4583be2fa3e4206750a861e8c61823e1d93741cd119bbb64c65f18f9abee19f/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f706870697869652f74656d706c6174652e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/phpixie/template)

[![Author](https://camo.githubusercontent.com/24a0a94bb83eb81ba03c32074967dc730174cfd2849e984169db461d955cdbb9/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40647261636f6e792d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/dracony)[![Source Code](https://camo.githubusercontent.com/b3f915a1ff1c9fd84ee4c1c8c4ff6cb0639b203e84b512ce86690b358384de2a/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d706870697869652f74656d706c6174652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/phpixie/template)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/phpixie/template/blob/master/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/d9520bea80504b60865c2288bf5b2089d9db1c4d55a4b7682d34f5eb83295e34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706870697869652f74656d706c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpixie/template)

PHPixie Template uses PHP as the templating language, but can also handle layouts, content blocks, custom extensions and even custom formats. It’s super easy to use it to parse HAML, Markdown or whatever else you like. All you need to do is provide a compiler that will translate your format into a plain PHP template, the library will take care of caching the result, updating it when the files are modified etc. by itself.

**Inheritance**
It’s pretty inuitive to understand template inheritance, especially if you used Twig or even Smarty. Here is a quick example:

```
