Skip to content

Commit

Permalink
pass parentPath from the matrix mapping template
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Jun 28, 2024
1 parent b30200c commit ab0bff1
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 ab0bff1

Please sign in to comment.