yii-haml is extension for Yii Framework 1.1.x that brings HAML power to your views. Based on forks of phamlp project.
- Add this to your composer.json :
"repositories": [
{
"type":"composer",
"url": "http://packages.phundament.com"
},
{
"type": "package",
"package": {
"name": "delfit/phamlp",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/delfit/phamlp",
"reference": "master"
}
}
}
],
"require": {
"delfit/phamlp": "*",
"delfit/yii-haml": "*"
}
- Run
composer update
for your project
- Add component to your
config/main.php
:
return array(
'components' => array(
'viewRenderer' => array(
'class' => 'application.vendor.delfit.yii-haml.HamlViewRenderer',
),
),
);
- Write your views in HAML and name them with *.haml extension
As far as yii-haml
is just a Composer-powered wrapper around phamlp
, you should read this docs :
There is a plugin for PHP HAML syntax for Sublime Text 2 : sublimetext-php-haml