{# Mapp Form Section - Backward Compatible data.text - Structured Object Variant - data.mappid, data.title, data.text The section loads one of the MAPPFORM component variations The order of how we set the options is important for overriding the settings in external extends #} {% extends 'sections/default/_base/default.twig' %} {# Either StructuredObject or just a simple custom_text section #} {% set data = StructuredObject.getAttributes(section.data) ?: section.data %} {% set layout = data.layout|default('default') %} {% set template = 'components/mappform/default.twig' %} {# Genera Settings #} {% set options = options|default({}) + { sections_variant: 'mappform' ~ (layout ? '-' ~ layout ), mappform_id: data.mappid|default(data.text), mappform_url: config.get('theme/mappform_url', false), } %} {% block section_content %} {% include [ template, 'components/mappform/default.twig'] with {options: options} %} {% endblock %}