{# Sailthru Form Section - Backward Compatible data.text - Structured Object Variant - data.mappid, data.title, data.text The section loads one of the SAILTHRU component variations The order of how we set the options is important for overriding the settings in external extends This template will also check if URL is correct and abort if not #} {% 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') %} {# Genera Settings #} {% set options = options|default({}) + { sections_variant: 'sailthru' ~ (layout ? '-' ~ layout ), forms_url: data.url|default|striptags|trim, } %} {# Layout Settings --- IntroBox #} {% if layout == 'introbox' %} {% set template = 'components/sailthru/introbox.twig' %} {% set options = options|default({}) + { forms_title: data.title|default, forms_text: data.text|default, forms_autowrapper_adslot_allowed: false, forms_autowrapper_colclass: 'col-12', } %} {# Layout Settings --- Default #} {% else %} {% set template = 'components/sailthru/default.twig' %} {% endif %} {% block section_content %} {% include [ template, 'components/sailthru/default.twig'] with {options: options} %} {% endblock %}