Adding ACF Repeater Content to Off Canvas Modal

Hi!

I’m trying to implement an ACF field into an Off Canvas Modal element, specifically a Repeater field.

When using the Cornerstone method of {{dc:acf:field field=“my_repeater_content”}} the returned content is simply “Array, array, array”

Does this content needed to be added programmatically? If so, how can I target this specific Off Canvas Model in the child functions.php file?

Any help would be greatly appreciated, thanks!

Hello ComDoc,

Thanks for writing in!

You should be using this code inside your off canvas modal element:

{{dc:post:meta key="my_repeater_content"}}

We would love to know if this has worked for you. Thank you.

Thanks, @ruenel!

I ended up going a different route that may end work better in the long run.

Question though, why would I use that above code when it doesn’t appear to use “acf” anywhere in it? Should or can all ACF fields be called in the same manner, or is it different for certain ACF types?

Asking for future reference :slight_smile:

Hi ComDoc,

The repeater field is composed of sub-field, so you need to output the dynamic code of the sub-field instead.

e.g.

{{dc:acf:field field="lorem_repeater_0_repeater_subfield"}}

Where the lorem_repeater is the repeater field name, the repeater_subfield is the sub-field name, and 0 is the item. (Array counting starts at 0)

Cornerstone/Content Builder Integration

Thanks,

1 Like

@friech, thank you very much!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.