IMPLEMENTED: ACF Link Field enhancements

Hey guys, hey @timmse,

I am trying to use ACF link fields for the buttons within a hero section within a template. Therefore I need not only the link fields’ URLs but also their titles (and ideally also their targets).

Looking at the Bricks source code (provider-acf.php) it seems that for ACF link fields always and only the URL is returned – no matter the return type in the field settings.

It would be great if you could add a way to get the other properties using dynamic data filters or something.

Thanks in advance!

4 Likes

Hey Andre,
now we have some breathing space again for this request, which makes perfect sense from our point of view.

We are on it!

Best regards,
timmse

3 Likes

That’s awesome! Take your time though… there are ways around it for now. :smiling_face:

1 Like

Hi Andre,

We’ve added this improvement to Bricks 1.8 beta 2, now available as a manual download in your account.

Please let us know if you are still experiencing issues.

As with any beta release, please do not use it on any production/live website. It is only meant for testing in a local/staging environment.

1 Like

Hey guys,

Sorry to revive an old thread but I found it searching for a way to retrieve the target and title of an ACF Link field to use in Bricks with dynamic data.

I see a fix was implemented but I don’t see how to use it :sweat_smile:

For anyone else who finds this in future: you must use the array_value filter - docs examples here.

You can then use {acf_your_link:array_value|title} in the Bricks editor’s “Attribute: title” field, which accepts dynamic data.

You need to create a target attribute yourself from the Style tab, then set that with {acf_your_link:array_value|target}

IMO Bricks team could add the target attribute as one of the direct dynamic data inputs, alongside rel, aria-label and title. It is the only one missing that is natively passed in the array from ACF Link field.