hamlphp / HamlPHP

Yet another Haml to HTML converter written in PHP.
http://hamlphp.github.com/HamlPHP
MIT License
84 stars 15 forks source link

Inheritance? #22

Closed thgie closed 11 years ago

thgie commented 11 years ago

Thanks for the good work on HamlPHP. I'm using it in conjunction with slim.

Is there any way to have template inheritance, like in Twig? Or what is the best way to share parts of templates?

svallory commented 11 years ago

Sorry for the late response! HamlPHP isn't a template engine it's a language parser. @licensetoil forked implemented helpers for rendering partials. I believe that would be the best way to do it. It wasn't merged into HamlPHP because it's not the purpose of the project. Be aware that https://github.com/licensetoil/HamlPHP repository is outdated, but you can look at how he did it and implement it in an updated version.

thgie commented 11 years ago

Thanks for the reply svallory. I found just what I needed with MtHaml. It parses haml to php or twig. And twig has inheritance: https://github.com/arnaud-lb/MtHaml