https://github.com/arnaud-lb/silex-mthaml
HAML templating for Silex
https://github.com/arnaud-lb/silex-mthaml
Last synced: about 2 months ago
JSON representation
HAML templating for Silex
- Host: GitHub
- URL: https://github.com/arnaud-lb/silex-mthaml
- Owner: arnaud-lb
- Created: 2013-03-29T17:14:04.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-12-13T18:38:52.000Z (over 8 years ago)
- Last Synced: 2024-05-01T22:56:00.196Z (about 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Silex-MtHaml
[HAML][haml] templating for Silex using the [MtHaml PHP HAML parser][mthaml].
## 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
Install using composer:
```
$ composer require mthaml/silex-mthaml:*
```Then register the service provider:
``` php
register(new Silex\Provider\TwigServiceProvider() [...]
$app->register(new SilexMtHaml\MtHamlServiceProvider());
```## Usage
Name your template with a `.haml` suffix, and call `render` as usual.
## Syntax
See [MtHaml][mthaml] docs
[haml]: http://haml-lang.com/
[mthaml]: https://github.com/arnaud-lb/MtHaml