I stuck at a serious simple problem. I try to loop over Grav pages and dynamically output there links.
{% for news in page.find('/aktuelles').children.order('header.news_date', 'asc').slice(0, 3) %}
<div class="recent-news">
<a href="{{ news.url }}">
<span>{{ news.header.news_date|date("d.m.Y") }}</span>
{{ news.title }}
</a>
</div>
{% endfor %}
Unfortunatly the Twig code
{{ news.url }}
doesnt get replaced by the value behind the variable. Instead the generated link looks like this http://127.0.0.1/%7B%7B%20news.url%20%7D%7D. I tested the variable capsuled in the a-Tag. That worked! Does anybody know why twig can´t be rendered in a´s href-Attribute and have a workaround for me? Thanks!