Skip to content

Commit

Permalink
Merge pull request #1761 from bolt/bugfix/extension-fields-in-collect…
Browse files Browse the repository at this point in the history
…ions

Allow collections to include extension fields
  • Loading branch information
bobdenotter authored Aug 24, 2020
2 parents 29e6703 + 1ee6bd9 commit cc376d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/_macro/_macro.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@
{% set context = context|merge({'include_id': true}) %}
{% endif %}

{% include '@bolt/_partials/fields/' ~ item_field.type ~ '.html.twig' with context only %}
{% set includeLookup = [
'@bolt/_partials/fields/' ~ item_field.type ~ '.html.twig',
'@' ~ item_field.type ~ '/' ~ item_field.type ~ '.html.twig',
'@bolt/_partials/fields/generic.html.twig'
] %}

{% include includeLookup with context only %}
{% endset %}
{# set the label manually as set in _base.html.twig, to pass to Collection.vue for templates #}
{% set label = item_field.definition.label|default(item_field.name|default('unnamed')|ucwords) %}
Expand Down

0 comments on commit cc376d3

Please sign in to comment.