Skip to content
Grav 2.0 is officially stable. Read the announcement →
Content & Markdown

Twig href value inside a block not parsed

Started by Seb 8 years ago · 1 replies · 1058 views
8 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!

8 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, 9 months ago
6 570 9 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 528 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 452 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 375 1 year ago
Content & Markdown · by belthasar, 2 years ago
4 686 2 years ago