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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Twig href value inside a block not parsed

Started by Seb 8 years ago · 1 replies · 952 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, 8 months ago
6 99 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 186 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 62 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 257 1 year ago