I am trying to set a custom HTML attribute name using twig, trying to achieve this:
<div age="24"> Something </div>
This is my code:
{% set custom_age_attribute= "age" %}
<div {{custom_age_attribute}}="24"> Something </div>
But the twig code is not rendering and getting this:
<div {{custom_age_attribute}}="24"> Something </div>
Is there any way to make it work?