{# 1. Get the current route name into a variable for easier use #} {% set current_route = app.request.attributes.get('_route') %}
    {% if is_granted("ROLE_ADMIN") %} {# 2. Check if route is 'app_index' #}
  • {{ ux_icon('material-symbols:dashboard-outline-rounded', {height: '16px', width: '16px'}) }} Dashboard
  • {% endif %} {# 3. Check if route starts with 'application_' (covers index, edit, show, etc.) #}
  • {{ ux_icon('material-symbols:settings-applications-outline', {height: '15px', width: '15px'}) }} Applications
  • {% if is_granted('ROLE_ADMIN') %}
  • {{ ux_icon('fa6-regular:circle-user', {height: '15px', width: '15px'}) }} Users
  • {% endif %} {% if can_view_org_menu() %}
  • {{ ux_icon('bi:buildings', {height: '15px', width: '15px'}) }} Organizations
  • {% endif %}