{% import "_includes/forms" as forms %} {% if sections %} {% set sectionOptions = [] %} {% for section in sections %} {% set sectionOptions = sectionOptions|merge([{ label: section.name|t('site'), value: section.id }]) %} {% endfor %} {{ forms.selectField({ label: "Section"|t('app'), instructions: "Which section do you want to publish entries to?"|t('app'), id: 'section', name: 'section', options: sectionOptions, value: widget.section, toggle: true, targetPrefix: 'section' }) }} {% set selectedSectionId = widget.section %} {% for section in sections %} {% set showSection = ((not selectedSectionId and loop.first) or selectedSectionId == section.id) %} {% endfor %} {% else %}

{{ "No sections are available."|t('app') }}

{% endif %}