From ee1f43d9aac67940713ff51c5c6d08fc2dea713b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 31 Oct 2013 17:49:38 +0100 Subject: [PATCH] make tabs and submenus working --- Resources/config/routing.yml | 4 ++++ Resources/views/Person/view.html.twig | 11 ++++++++--- Resources/views/menu.html.twig | 10 ++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index a211a789d..534d931be 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -3,6 +3,10 @@ chill_person_view: pattern: /view/{id} defaults: { _controller: CLChillPersonBundle:Person:view } + options: + menu: person + order: 50 + label: menu.person.general_view chill_person_search: diff --git a/Resources/views/Person/view.html.twig b/Resources/views/Person/view.html.twig index 2ed217c0a..9e0480d38 100644 --- a/Resources/views/Person/view.html.twig +++ b/Resources/views/Person/view.html.twig @@ -25,10 +25,15 @@ This view should receive those arguments:

{% trans %}views.Person.view.without_nationality{% endtrans %}

{% endif %} - - {{ include("::menu.html.twig", {'person': person, 'menu_composer' : menu_composer }) }} - +
+ {{ include("CLChillPersonBundle::menu.html.twig", +{'person': person, 'menu_composer' : menu_composer, 'route_active': 'chill_person_view' }) }} + +
+

My tab is active so I'll show up first! Inb4 tab 3!

+
+
{% endblock %} diff --git a/Resources/views/menu.html.twig b/Resources/views/menu.html.twig index 8ad4bc849..9246123d4 100644 --- a/Resources/views/menu.html.twig +++ b/Resources/views/menu.html.twig @@ -1,7 +1,13 @@
-