Dynamic Content 2.0 Error In Custom Attributes

Hi Charlie,

I think I have found a bug when DC is used in Custom Attributes. For example, if I set a custom attribute like this:

data-date
{{ looper.field({"key":"event_start_date_formatted"}) }}

The inspected output is as follows:

If it is entered in the traditional way it renders correctly:

data-date
{{dc:looper:field key="event_start_date_formatted"}}

2024-07-11_15-20-40

Can you replicate the error?

Thanks,
Christopher

There’s some weird JSON processing preventing this that we’ll have to change. You can probably get around this by using {{ looper.item.event_start_date_formatted }}

1 Like

No problem, reverting to the dc:looper:field key="...." works fine. It is just in the Twig version it fails. Thought it was worth reporting to you!

1 Like