I am using Symfony2 framework and Twig template engine with kendoui. I try to use path twig function inside kendo template. Below are working and non-working codes.
When i use path twig function without parameters inside kendo template it works well.
However when i use path twig function with parameters inside kendo template it doesn't work and Symfony gives "Variable "name" does not exist" error.
<script id="rowTemplate" type="text/x-kendo-tmpl">
How can i make it work path function with parameters?
When i use path twig function without parameters inside kendo template it works well.
<script id="rowTemplate" type="text/x-kendo-tmpl">
<tr>
<td>
<a href="{{ path('hedehodo') }}">
<img src="${ name }" alt="${ name }" />
</a>
</td>
</tr>
</script>
However when i use path twig function with parameters inside kendo template it doesn't work and Symfony gives "Variable "name" does not exist" error.
<script id="rowTemplate" type="text/x-kendo-tmpl">
<tr>
<td>
<a href="{{ path('hedehodo', {'name': name }) }}">
<img src="${ name }" alt="${ name }" />
</a>
</td>
</tr>
</script>
How can i make it work path function with parameters?