BKWLD / laravel-haml

Wraps MtHaml for ease use in Laravel
MIT License
45 stars 10 forks source link

Using haml + blade #5

Closed pvos closed 9 years ago

pvos commented 10 years ago

Implemented your code for haml views works great. However I would like to combine the use of haml with the blade language.

Is there a workaround to combine and may I add this as a feature request? If you can pinpoint me in right direction on how to achieve this, I can make a pull request also.

weotch commented 10 years ago

Yeah, I'm not sure offhand if Laravel supports parsing a view twice. I don't use blade personally, but I have wanted to do this to support mustache templates. Mthaml, the workhouse of the haml parsing, supports Twig as part of it's package. Maybe a solution could be to have MtHaml support blade? And to add that support through this package's service provider?

Though I think the first step is to see if you can get Laravel to parse something twice by naming the file like 'view.haml.blade.php'

pvos commented 10 years ago

@weotch This feature request / idea is not something we need straight away but something that would benefit in smaller views and is on my todo for near future. Tested naming .blade.haml and haml.blade which does not work out of the box. Perhaps we can make a issue on the Laravel github repo. Thank you for your information.

pvos commented 10 years ago

Any updates on this one? Anyone tried to approach implementing both blade and HAML?

weotch commented 10 years ago

I think @webard is using it, see #13

weotch commented 9 years ago

@trupedia can you let me know if that new commit on master works for your blade setup?

weotch commented 9 years ago

Also, you may note that you can use either .blade.haml or .blade.haml.php .haml.blade or .haml.blade.php as your extension.

ghost commented 9 years ago

@weotch Blade syntax works with the latest commit now as expected with your .blade.haml and .blade.haml.phpextension, before they were registered as .haml.bladeand .haml.blade.php.

weotch commented 9 years ago

Ok, gonna go ahead and tag the release