{% set route = app.request.attributes.get('_route') %} {% set depenses_active = route starts with 'app_expense' or route starts with 'app_subscription' %} {% set intervenants_active = route starts with 'app_contractor' and not (route starts with 'app_contractor_category') %}