How can I achieve something like this? I want to give my div a dynamic data attribute
<div {block attribute}{/block}>
{block attribute}data-my-attribute{/block}
But it gives me an error :/
@ando
Block inside html attribute isnt good way how dynamically add html attributes. The simplest way is use variable:
$this->template->myAttribute = 'data-my-attribute';
<div {$myAttribute}>
In latte is also something like n:attr, but direct rendering variable makes the code cleaner and more modern.