Skip to content

Boorj/Silex-MtHaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

About this version

This version is updated from original original source to support 1.27+ twig, which now gives $code to middleware MtHaml lexer as an instance of Twig_Source, not as a string.


Silex-MtHaml

HAML templating for Silex using the MtHaml PHP HAML parser.

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

// after $app->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 docs

About

HAML templating for Silex

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%