XaminProject / handlebars.php

Handlebars processor for php
331 stars 132 forks source link

How to I deal with nested arrays? #134

Open waltercruz opened 9 years ago

waltercruz commented 9 years ago

My handle:

https://gist.github.com/waltercruz/7e600f4e4c62b7262dd8

I can iterate it with this data on js:

https://gist.github.com/waltercruz/2539aea485f5b33baa0b

but using this twig template, doesn't iterate:

https://gist.github.com/waltercruz/0bccbc420afb3d3853fa

(sorry if the question is so basic)

JustBlackBird commented 9 years ago

Frankly, I don't understand why do you want to mix Twig with Handlebars.php. They are both server side templates engine so you would be better to use just one of them.

waltercruz commented 9 years ago

Ws using this bundle that extends from yours: https://github.com/smartive/SmartiveHandlebarsBundle

I used handlebars to make the styleguide (https://github.com/fbrctr/fabricator) of the site, and using the pieces directly from styleguide worked well for us.

thormeier commented 8 years ago

@waltercruz In the last gist, you're passing a variable statistics, even though you're setting a variable named rewards - is this intentional?