{% set scope = scope ?? prefix %} {% if blueprints.type %} {% set field = blueprints %} {% set current_value = data %} {% set default_value = defaults %} {% include ["forms/fields/" ~ field.type|replace({'.': '/'}) ~ ".html.twig", 'forms/fields/unknown/unknown.html.twig'] %} {% else %} {% for name, field in blueprints.fields %} {% if name starts with '.' %} {% set name = name[1:] %} {% endif %} {% set container = field.type == 'container.tabs' %} {% set current_value = container ? nested(data, scope|trim('.')) : nested(data, scope ~ name) %} {% set default_value = container ? nested(defaults, scope|trim('.')) : nested(defaults, scope ~ name) %} {% set has_value = current_value is not null %} {% set field_overrideable = field.overridable is defined ? field.overridable : (field.overrideable is defined ? field.overrideable : true) %} {% if field.type and name not in skip and not field.skip and not(ignore_not_overrideable and not field_overrideable and not has_value) and not(not has_value and not_global_overrideable) %} {% set field = field + {'name': name} %} {% include ["forms/fields/" ~ field.type|replace({'.': '/'}) ~ ".html.twig", 'forms/fields/unknown/unknown.html.twig'] %} {% endif %} {% endfor %} {% endif %}