Row Direction via ACF

I posted this bug a few weeks ago, and it appears to have been addressed in the latest version 6.5.4

Bugfix: Row Direction could not use parameters. There is a parameter type called "row-direction" to handle this

But the problem is it is not responding to ACF fields. I am using the code

{{ dc.looper.field({ key: 'image_location' }) }}

This field outputs true or false and I have confirmed it is outputting that by adding a text field in my row with that code above and I am able to get it to propelry output true or false but it is not changing the row-direction.

Unfortunately style fields can’t use looper data like you are trying to do. The row direction also needs to use either row or row-reverse like the below, but the issue is more so Dynamic Content can’t use looper data as it groups the styles together so it doesn’t generate a new class for every looper item. I’ve added a +1 to this issue in our tracker. You could probably get around this by adding a class to the row element based on your looper value and then adding Global CSS that changes that class to have flex-direction: row-reverse when the class is present in and element. Have a great day.

`{{ dc.looper.field({ key: 'image_location' }) ? 'row' : 'row-reverse' }}`
1 Like

Thanks Charlie! Putting it in the class and adding global css works great :slight_smile:

1 Like

Hi Kyle,

Glad that we are able to help you.

Thanks

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