PHPackages                             alexvasilyev/mthaml-bundle - 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. alexvasilyev/mthaml-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

alexvasilyev/mthaml-bundle
==========================

This Bundle provides a HAML templating engine

1.6.1(8y ago)026MITPHPPHP ^5.3.3|^7.0

Since Jun 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alexvasilyev/MtHamlBundle)[ Packagist](https://packagist.org/packages/alexvasilyev/mthaml-bundle)[ Docs](https://github.com/arnaud-lb/MtHamlBundle)[ RSS](/packages/alexvasilyev-mthaml-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (10)Versions (13)Used By (0)

MtHaml Bundle
=============

[](#mthaml-bundle)

[HAML](http://haml-lang.com/) Symfony bundle using the [MtHaml PHP HAML parser](https://github.com/arnaud-lb/MtHaml).

[![Build Status](https://camo.githubusercontent.com/875065bc6134de91e40efed5f5de277687abe0d71d869fd44cb1902523ac4008/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61726e6175642d6c622f4d7448616d6c42756e646c652e706e67)](http://travis-ci.org/arnaud-lb/MtHamlBundle)

Features
--------

[](#features)

- **Acts as a Twig preprocessor**: Supports Twig functions, filters, macros, blocks, inheritance, expressions and every Twig features
- **Mix Twig and HAML templates**: You can include, extend, use and import Twig templates from HAML templates, and vice versa.
- **High performance**: Templates are compiled to PHP code and cached, no parsing or runtime overhead.
- **HAML syntax** supported by editors

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

[](#installation)

### Step 1: Download MtHaml and MtHamlBundle

[](#step-1-download-mthaml-and-mthamlbundle)

Ultimately, the MtHaml files should be downloaded to the vendor/MtHaml directory, and the MtHamlBundle files to the vendor/bundles/MtHamlBundle directory.

This can be done in several ways, depending on your preference. The first method is the standard Symfony2 method.

#### Using Composer

[](#using-composer)

```
$ composer require mthaml/mthaml-bundle:dev-master

```

(You can skip Step 2 if you are using this method as Composer will handle autoloading for you.)

#### Using the vendors script

[](#using-the-vendors-script)

Add the following lines in your deps file:

```
[MtHaml]
    git=git://github.com/arnaud-lb/MtHaml.git
    target=MtHaml
[MtHamlBundle]
    git=git://github.com/arnaud-lb/MtHamlBundle.git
    target=bundles/MtHamlBundle
```

Now, run the vendors script to download the bundle:

```
$ php bin/vendors install
```

#### Using submodules

[](#using-submodules)

If you prefer instead to use git submodules, the run the following:

```
$ git submodule add git://github.com/arnaud-lb/MtHamlBundle.git vendor/bundles/MtHamlBundle
$ git submodule add git://github.com/arnaud-lb/MtHaml.git vendor/MtHaml
$ git submodule update --init
```

### Step 2: Configure the Autoloader

[](#step-2-configure-the-autoloader)

You can skip this step if you used composer to install the bundle.

Add the `MtHaml` and `MtHamlBundle` namespaces to your autoloader:

```
