{% import "_includes/forms" as forms %} {% if blx.hasPackage('PublishPro') %} {% set blocks = blx.entryBlocks.getBlocksBySectionId(settings.section) %} {% else %} {% set blocks = blx.entryBlocks.getAllBlocks %} {% endif %}
{{ forms.textField({ label: "Title"|t, id: 'title', name: 'title', required: true }) }} {% for block in blocks %} {% if block.required or block.id in settings.blocks %} {% include "_includes/blockfield" with { block: block } only %} {% endif %} {% endfor %}