{# Let the '':'' in array and do not alter that line - it will mess up the condition with in array #}
{% set loggedStat = 'not-logged' %}
{% if app.user %}
{% set loggedStat = 'logged-in' %}
{% endif %}
{% set bodyClassConditions = {
'social_support' : 'support-page ',
'social_about_flirto': 'support-page ',
'social_terms_conditions': 'support-page ',
'social_privacy': 'support-page ',
'social_online_safety': 'support-page ',
'social_frontend_call_window': 'call-window ',
'social_frontend_call_window_html': 'call-window ',
'':''
} %}
{% set currentActionArray = app.request.get('_controller')|split('::') %}
{% set controllerStack = currentActionArray|first|split('\\') %}
{% set partOne = (controllerStack|last)|replace({'Controller': ''}) %}
{% set partTwo = currentActionArray|last|replace({'Action': ''}) %}
<body {% if app.request.get('_route') == 'social_user_homepage' %} id="home-page"{% endif %} class="set-language-user-{{ app.request.locale }} {% if app.request.get('_route') in bodyClassConditions|keys %}{{ bodyClassConditions[app.request.get('__route')] }}{% endif %} {{ loggedStat }} {{ partOne|lower ~ '-' ~ partTwo|lower }}">