{# @var craft \craft\web\twig\variables\CraftVariable #} {# @var entry \craft\elements\Entry #} {# {% embed '_embeds/oneColumn/_template.html' with { entry: entry } o opt: { cn: 'e-oneColumn', modifiers: [], data: {}, js: null, intro: null, content: null }, entry: entry } only %} {% block intro %} Block: Intro! {% endblock %} {% block content %} Block: Content! {% endblock %} {% endembed %} #} {# -- Set Defaults -- #} {% set defaults = { cn: 'e-oneColumn', modifiers: [], customClasses: [], data: {}, js: null, intro: null, content: null } %} {# -- Merge Default with Options -- #} {% set opt = opt is defined ? defaults|merge(opt) : defaults %} {# -- Modul -- #} {% if opt.intro and opt.content %}
{% block intro %} Block: Intro! {% endblock %}
{% endif %} {% if opt.content %}
{% block content %} Block: Content! {% endblock %}
{% endif %} {% endif %}