Will Rowe

Results 179 comments of Will Rowe

Closing this in favor of #828 since that prevents any conflicts by avoiding storing the template instance in the registry at all.

Are you referring to "As syntactic sugar, you can also use the [] notation" mentioned [in the TwigPHP docs](https://twig.symfony.com/doc/3.x/filters/slice.html)?

Here is an updated link to the TwigPHP docs: https://twig.symfony.com/doc/2.x/advanced.html#globals

Here it is [working in TwigPHP](https://twigfiddle.com/wq9xaq) and [not working in twig.js](https://codepen.io/willrowe/pen/poLWjJB).

@ostrojs can you provide an example [using this template](https://codepen.io/pen?template=LYQawea) at a starting point?

I created a couple of tests for this and was not able to get twig.js to load paths with trailing or leading whitespace if they did not exist. Something may...

- Reference in [TwigPHP docs](https://twig.symfony.com/doc/3.x/functions/block.html) - [TwigPHP example](https://twigfiddle.com/w8mcji) - [twig.js example](https://codepen.io/willrowe/pen/ZExXjXE)

- [TwigPHP example](https://twigfiddle.com/vavskc) - [twig.js example](https://codepen.io/willrowe/pen/XWEzxwO)

- [TwigPHP example](https://twigfiddle.com/c9bbvi) - [twig.js example](https://codepen.io/willrowe/pen/PoRQERd)

Does it work if you set `rethrow` to `true` in the app `twig options`?