I have this code:
href="{{ path('new') }}"
Now is necessary use one variable in this section:
href="{{ path(item.ruta) }}"
But this show a error:
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "" as such route does not exist.").
How can solution this problem?
item.rutais empty, so no route could be generated. You could specifiy a fallback like this{{ path(item.ruta ? item.ruta : 'new') }}The idea is to assign the content of item.route within path?