ACF Repeaters & Loopers

Heya!

I’ve been step-by-stepping the following video (awesome asset btw):

I’ve successfully been able to target and pull in my repeater, using {{dc:acf:post_field field="elevations"}}

Per the video, theoretically the following should work to pull in content from the repeater’s fields:{{dc:looper:field key="in_image"}} , however I’m finding that it doesn’t appear to. There is only one subfield in the repeater itself.

For a bit broader scope, my intention is to pull the URL to a photo as a custom background image which is served via a CDN. The full snippet I’m attempting to use in the HTML box for this item is <img src="{{dc:looper:field key="in_image"}}">


Other troubleshooting steps:

  • Tried variations such as {{dc:acf:field field=""}} just in case, with no luck.
  • Checked for theme/plugin updates, also just in case (sometimes I find that an outdated version of X/Pro or ACF will cause problems with loopers)

Can you shine any light on what I might be stumbling over here?


UPDATE

I did test to make sure that the overall looper setup above works. It turns out that it does, and something about dropping it into an <img> tag source breaks it.

Hello @Rule72,

Thanks for writing in! I have investigated your issue and it seems that there is an issue with your images from the CDN itself. When I view the image kink on my browser, this is what I am seeing:

  • See the secure note below.

You may need to contact your CDN provider for further assistance.

Kindly let us know how it goes.

You called it! They didn’t whitelist my build. :stuck_out_tongue:

Apologies for wasting your time lol.

No worries, @Rule72.

Actually, turns out I’m still having an issue.

I’ve natively downloaded the images and switched the above elements to eliminate the CDN for now… however, it’s looking like the exact deal above isn’t rendering.

(Note: switched terminology in ACF)

Targeting the looper using {{dc:acf:post_field field="images"}} at the column level, which should target this repeater.

image

…and attempting to accessaccessing the looper content (a full URL to an image, e.g. ) to ostensibly display the sub-field, using <img src="{{dc:looper:field key="floorplans"}}"></img>, using a text element.

image


However, it appears as if the initial Dynamic Content targeting isn’t actually triggering the loop for some reason. I would expect to see 4x text elements repeated before even dropping in the <img> tab, yet I only see one. Makes me think it’s an issue with the looper, which is odd considering that I seem to have been able to achieve this earlier using the same method as above.

image

Hey @Rule72,

Your site’s currently down. If your site is loading on your end, please disable all restrictions so that your site is accessible world-wide because our team is working from different locations across the globe.

image

Thanks.

I’m guessing that’s because I’ve bypassed the proxy; it’s enabled and should work now.

Hello @Rule72,

It seems that you have resolved the issue because when we view the page, we are now seeing the images:

  • See the secure note

If you need further assistance, please do not hesitate to create another thread.

I actually haven’t resolved this! The workaround I’d (hopefully temporarily) implemented is to manually upload the photos in this flow and link them to relational ACF fields, that’s why you’re seeing these. I should have mentioned that.

So the previous bug or failed implementation is still in effect; would you like me to build a test layout and drop it here to continue?

Hey @Rule72,

Yes, please! Create a test layout and we will check on how you set up the structure.

Cheers!

Will do! ETA is Tuesday (mostly adding this date for myself lol).

Hello @Rule72,

Please let us know when it is ready.

Thanks

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