Component and ACF repeater field

Is still there a problem with the component and the ACF repeater field?

I build the following component:

But, when I try to reach the repeater field, I have different results.

For the text, it works:

But not for the title, nor the picture

Capture d’écran 2025-01-30 à 11.21.48

Capture d’écran 2025-01-30 à 11.23.21

Hi @Ombres-et-lumieres ,

You are using both a repeater and component properties, which get their data from different places.

As there is no repeater component property, it is not possible to connect a repeater within a component directly to a dynamically selected repeater.

This means any repeater within a component works the same as a repeater outside of a component and everything seems to work correctly.

It doesn’t make sense to use a repeater to display component properties because the repeater will try to iterate over whatever repeater ACF field you have connected it to to get its data.

I will provide the information I can, which hopefully will match what you are wanting to do.

For displaying the data from the repeater field:

In the dynamic image Data field you have selected ACF. Instead you need to choose Repeater and select the image field you created.

For displaying the data from the component properties:

You can simply add the image to the canvas and link the source to the respective component property.

Let me know if this answers your query or if you need any further clarification.

I understand. I think.

I was so into the process of building a general component that I forgot that, in a repeater case, I had to create, first, a repeater block like that:

Capture d’écran 2025-01-31 à 11.51.29

With this I have that on the front page (Bruselas-Destreza.be):

And to include the component inside.

As Photographer, in my websites I use a lot of photos with two sizes of photos depending on portrait or landscape. And so, I was trying to build an all purpose component like this:

Capture d’écran 2025-01-31 à 11.35.12

Distracted is my second name :upside_down_face:

1 Like

Great. You can use something like that for dropping in images directly and choosing them from the component properties if you want to influence the display in some way.

For your specific display use case I don’t think you need the component properties or any extra repeater fields because the image should fill the width automatically regardless of its height :+1: