{% extends '@ibexadesign/content/content_view_fields.html.twig' %} {% block extras %} {% set current_language = app.request.get('languageCode') ?: content.prioritizedFieldLanguageCode %} {% if languages|length > 1 %}
{% set choices = languages|map((language) => { value: path('ibexa.content.translation.view', { 'contentId': location.contentId, 'locationId': location.id, 'languageCode': language.languageCode }), label: language.name }) %} {% set value = '' %} {% for language in languages %} {% if current_language == language.languageCode %} {% set value = path('ibexa.content.translation.view', { 'contentId': location.contentId, 'locationId': location.id, 'languageCode': language.languageCode }) %} {% endif %} {% endfor %} {% set source %} {% endset %} {% include '@ibexadesign/ui/component/dropdown/dropdown.html.twig' with { source: source, choices: choices, value: value, is_small: true, } %}
{% endif %} {% endblock %}