arnaud-lb / MtHaml

Multi target HAML (HAML for PHP, Twig, <your language here>)
Other
359 stars 54 forks source link

Support for Smarty templates #37

Closed calvinte closed 10 years ago

calvinte commented 11 years ago

I'm working on an older project right now that relies heavily on the Smarty tempting engine. I'm curious if you can point me in the right direction to figure out how to plug Smarty into MtHaml.

Using MtHaml will let us iteratively re-write the templates, while still using Smarty, until we can switch to Twig down the line.

Thanks :)

arnaud-lb commented 11 years ago

That would be awesome :)

You basically have to implement a Smarty renderer for outputing Smarty code instead of PHP or Twig code.

See the Twig renderer as an example:

lib/MtHaml/Target/Twig.php lib/MtHaml/NodeVisitor/TwigRenderer.php