This is a migrated thread and some comments may be shown as answers.

using kendo template with path twig function

0 Answers 156 Views
Templates
This is a migrated thread and some comments may be shown as answers.
cascem
Top achievements
Rank 1
cascem asked on 19 Apr 2012, 04:12 PM
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.
<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?

No answers yet. Maybe you can help?

Tags
Templates
Asked by
cascem
Top achievements
Rank 1
Share this question
or