Skip to content

Commit

Permalink
[#45] Actually use _blocks/index.twig
Browse files Browse the repository at this point in the history
Whoops :)
  • Loading branch information
joshuapease committed Dec 18, 2024
1 parent cd3187b commit 2437c82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions templates/_blocks/index.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% set blocks = blocks ?? [] %}

{% for block in blocks %}
{{ include("_blocks/_#{block.type.handle}.twig", {
block,
}) }}
{% endfor %}
6 changes: 0 additions & 6 deletions templates/_elements/home.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@
{{ include("_blocks/index.twig", {
blocks: entry.pageBlocks,
}) }}

{% for block in entry.pageBlocks %}
{{ include("_blocks/_#{block.type.handle}.twig", {
block,
}) }}
{% endfor %}
{% endblock %}

0 comments on commit 2437c82

Please sign in to comment.