cześć
mam błąd w Symfony i nie moge sobie z nim poradzić :/
(przyklad z ksiązki Gajdy)
prosze o pomoc

An exception has been thrown during the rendering of a template ("No route found for "GET Default:menu"") in kernel.root_dir/Resources/views/layout.html.twig at line 9.
500 Internal Server Error - Twig_Error_Runtime
2 linked Exceptions: NotFoundHttpException » ResourceNotFoundException »


zawartość: layout.html.twig

  1. {% extends "::base.html.twig" %}
  2. {% block body %}
  3. <div id="pojemnik">
  4.  
  5. {% render "My5TrenyBundle:Default:menu" %}// <<<<<<<<<<<<<<<<< czepia sie o tą linie :/
  6.  
  7. <div id="tresc">
  8. {% block contents %}
  9. {% endblock %}
  10. </p>
  11. </div>
  12. <br class="clear" />
  13. </div>
  14. {% endblock %}


zawartość: menu.html.twig

  1. <ul>
  2. {% for entity in entities %}
  3. <li>
  4. <a href="{{ path('tren_show', { 'slug': entity.slug }) }}">
  5. {{ entity }}
  6. </a>
  7. </li>
  8. {% endfor %}
  9. </ul>




ZAMYKAMy TEMAT,, w SYMFONY 2, należy użyć smile.gif

{{ render(controller("My5TrenyBundle:Default:menu")) }}