Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Adding flexible content to a template

Koen edited this page Aug 1, 2019 · 2 revisions

When flexible content is added to a page or post type, it is available in the Twig templates via post.meta('flexible_content').

Add flexible content to a template

We have constructed a partial that will loop over all fields:

{% include 'partials/flexible-content.twig' with { 
    content: post.meta('flexible_content'),
} %}

This will automatically render the all flexible content partials for the blocks added in the CMS.