This project has been dropped in favor of kohana3-haml.
Looks like HamlPHP still needs a lot of work. Project is bringed back until bugs in HamlPHP are fixed.
Kohana PHamlP Module
This module is for Kohana 3.0+.
- Download the source code, extract it and put it in your Kohana's modules directory.
- Download phamlp and put it into vendor/ directory (https://github.com/d4rky-pl/phamlp is recommended over the original version, but you can find other forks on github)
- Enable the module in your bootstrap file (
- Copy and paste the configuration file (
config/phamlp.php) to your application's config directory.
- Make necessary changes to the configuration file to suit your needs.
- Copy and paste the controller file (
classes/controller/haml.php) to your controller directory if you want to customise it.
- By default the view files have
.hamlas the file extension.
If you would like to take advantage of the Haml controller shipped with this module, simply:
- Make sure the layout file exists (configurable by setting
$this->$templatein the controller).
- Make sure the view files exist. View files follow the
If you would like to take control of the view rendering yourself, you can:
- Either don't inherit from
Controller_Haml, or set
Haml::factory($view_file, $view_data, $haml_options).
- Default Haml options are configured in
config/phamlp.phpfile - these apply to all Haml templates generated.
- Optionally, you may set per controller or per action Haml options via
$this->haml_optionsin your controller actions. These overrides the default options.
- Assign view variables to
$this->view_data['title'] = 'My Website';.
- You may use either
Haml::bind_global()to set global view variables.
Viewobject, so you may use
set()and magic getter/setters on it.
- Sass support.
Brought to you by Wuit - http://wuit.com.
Currently maintained by Michał Matyas (http://github.com/d4rky-pl)