Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Twig href value inside a block not parsed

Started by Seb 9 years ago · 1 replies · 1128 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, 11 months ago
6 967 11 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 766 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 680 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 602 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 988 2 years ago