Skip to content

Commit

Permalink
Merge pull request #1475 from craftcms/bugfix/1466-complex-fields-in-…
Browse files Browse the repository at this point in the history
…matrix

pass `parentPath` from the matrix mapping template
  • Loading branch information
angrybrad authored Jul 9, 2024
2 parents cfc1aaf + 001ec94 commit a2d19b2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/templates/_includes/fields/matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@
{% for field in fields %}
{% set template = field.type ?? 'default' %}
{% set parentPath = [ handle, 'blocks', entryType.handle, 'attributes', field.handle ] %}
{% set variables = field|merge({ feed: feed, feedData: feedData, attribute: true, path: parentPath, classes: ['inner-matrix'] }) %}
{% set variables = field|merge({
feed: feed,
feedData: feedData,
attribute: true,
path: parentPath,
parentPath: parentPath,
classes: ['inner-matrix']
}) %}

{% include 'feed-me/_includes/fields/' ~ template ignore missing with variables only %}
{% endfor %}
Expand Down Expand Up @@ -118,6 +125,7 @@
field: field,
fieldClass: fieldClass,
path: parentPath,
parentPath: parentPath,
classes: ['inner-matrix']
}
%}
Expand Down

0 comments on commit a2d19b2

Please sign in to comment.