refactor menu layout to adapt to conditional menu

This commit is contained in:
Julien Fastré 2018-06-07 21:52:00 +02:00
parent 9bdec6338e
commit f2948e31de
2 changed files with 4 additions and 8 deletions

View File

@ -105,7 +105,7 @@
{% block vertical_menu_content %}
{{ chill_menu('person', {
'layout': 'ChillPersonBundle::menu.html.twig',
'args' : {'person_id': person.id },
'args' : {'person_id': person.id, 'person': person },
'activeRouteKey': activeRouteKey
}) }}

View File

@ -15,13 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
<ul class="tab-nav">
{% for route in routes %}
<li class="{% spaceless %}
{% if route.key == activeRouteKey %}
active
{% endif %}
{% endspaceless %} ">
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans|upper }}</a>
{% for menu in menus %}
<li class="">
<a href="{{ menu.uri }}" >{{ menu.label }}</a>
</li>
{% endfor %}
</ul>