Skip to content

Commit

Permalink
Pass parent through in sharedBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi Zitting committed Jun 18, 2019
1 parent 56f4340 commit af536c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/modules/blocks/sharedBlock.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% set blocks = block.sharedBlock.one().blocks.level(1).all() %}
{% set parent = block %}

{% set blocks = parent.sharedBlock.one().blocks.level(1).all() %}
{% for block in blocks %}
{% include ['modules/blocks/' ~ block.type, 'modules/blocks/noBlock.twig'] with { block: block } %}
{% include ['modules/blocks/' ~ block.type, 'modules/blocks/noBlock.twig'] with { block: block, parent: parent } %}
{% endfor %}

0 comments on commit af536c6

Please sign in to comment.