Roots Discourse

Reuse field configurations with Acf-Composer

Hello everybody!
I´ve been trying out by @Log1x and it´s working like a charm.
But I´m trying to figure out how/if it´s possible to “reuse” field configurations in multiple places.
Like so:

Thanks! Have a nice day

Isn’t this the purpose of the ACF Clone field? Or have I misunderstood the purpose of an ACF Clone field?

Hi! Thanks for your reply.
Well yes that is true.
But the purpose why I´m using acf-composer (which in turn is using acf-builder), is to avoid using AdvancedCustomFields like its normally intended.

I´m just struggling with getting it to work with this particular “reuse” functionality described here

But I´m reading up and will hopefully get it to work soon :slight_smile:

Feel free to open an issue up on the ACF Composer repo with what you’ve attempted so far and I’ll help you figure it out. I haven’t used ACF extensively for this kinda stuff since Gutenberg, so I’m not entirely sure at a glance.

Also, for “field partials” – if you used my ACF Builder guide at some point with get_field_partial(), it should be available in it’s same form as $this->get() while in one of your ACF Composer field classes (undocumented).

1 Like

Hi @Log1x!
I managed to get my initial issue to work. Read through your code a couple of times and figured out what I was missing.

Thanks for hinting about get_field_partial() and $this->get(), hadn´t read your guide before. Good stuff! This functionality is exactly what I was looking for.

Curious tho, you said you “haven’t used ACF extensively for this kinda stuff since Gutenberg”. How come? Because that is just what I´m about to do; compose acf-blocks with fields using ACF Composer :slight_smile:

Hm, I have a similar dichotomy: Gutenberg blocks (inline) or posts (and these placed as Gutenberg block).
Ideally, one has the choice: Gutenberg blocks that are mapped to posts.

I’ve mainly been working with native blocks as it is still able to give you that “editor experience” compared to swapping between ACF’s preview/edit modes – but it is also incredibly more time consuming making ACF Blocks a rather sane choice, especially with InnerBlock support (which I’ll have to PR into ACF Composer when I have time unless someone would be so kind)

1 Like

Ah I understand!
Thanks for your replies, @Log1x.

I have bit to go before being able to contribute something useful myself. Til then I´m soaking up as much as I can. Thank you!

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.