Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Twig href value inside a block not parsed

Started by Seb 9 years ago · 1 replies · 1264 views
9 years ago

Hi, some news about this bug, in archive but still alive?

/forum/archive/twig-variable-as-link-t6829

A summary as of today:

Inside a markdown file, set active both markdown and twig process,

Add this

<div><a href="{{ mylink }}">click me!</a></div>

See how the href is not parsed...

But move your 'a' outside your 'div' and it works!

Thanks everybody!

9 years ago

Should be an easy fix, you should add a filter,

HTML
<div><a href="{{ mylink }}">click me!</a></div>

should become

HTML
<div><a href="{{ mylink | raw }}">click me!</a></div>

Hope it helps :)

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 1 year ago
6 1663 1 year ago
Content & Markdown · by Ton Haarmans, 2 years ago
10 1235 2 years ago
Content & Markdown · by Jan L'Am, 2 years ago
4 1099 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 1002 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1492 2 years ago