Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexible Content #11

Open
drzraf opened this issue Jan 6, 2020 · 1 comment
Open

Flexible Content #11

drzraf opened this issue Jan 6, 2020 · 1 comment

Comments

@drzraf
Copy link

drzraf commented Jan 6, 2020

Most of the fields I would like to template belong to a huge "content" Flexible Content.
It contains multiple "Layouts" which each contains fields (like a "reusable block group").

I thought timber-acf-wp-blocks would allow me to progress smoothly from ACF "flexible content" to Gutenberg fields, but I fail to see how to map the Twig template naming to the (nested) field name.
Something like content.hero_layout_1.my_field?
(Another limitation is that ACF <-> blocks works on a group level ie: One ACF group represent one block which is not the case if using one Flexible field)

Also note that there seems to be a typo at https://palmiak.github.io/timber-acf-wp-blocks/#/filters
timber/acf-gutenberg-blocks-templates/{block_id} - filters data in block with block id {block_id} but the sample PHP code below uses timber/acf-gutenberg-blocks-data/{block_id}.

@palmiak
Copy link
Owner

palmiak commented Jan 7, 2020

Hi :)

To be honest I didn't tried to convert Flexible Content to Blocks yet. But it should be possible using timber/acf-gutenberg-blocks-data/ filter (so you can use the block value and the flexible content as fallback).

I can try to take a look it with some basic example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants