Skip to main content

Passing parameters to static blocks

You can now pass arbitraty parameters to static blocks, making it possible simplify the theme code by building more composable components.

As an example, you can pass color from your section to your static block:

{% content_for "block", id:"slide-1", type:"slideshow", color: "#F00" %}

From the block that data can be easily accessed:

{{ color }}

You can learn more about this feature in our developer docs.

Was this section helpful?