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

Flex objects -> render as Markdown

Started by Richard Scheglmann 6 years ago · 1 replies · 915 views
6 years ago

Hello,

i created a custom flex-object: "news" with custom fields. When i put Markdown in the fields the content is displayed in plain text, when i view the entries on i.e. website/flex-objects/directory:news.

I added the markdown twig:

TWIG
{% markdown %}
{% endmarkdown %}

in my default.html.twig of my news flex-object, but it didn´t work.

Can i use Markdown with flex-objects, or is the save to json the problem?

Thank you in advance

5 years ago

A late answer but it might be helpful. Add the markdown filter to the field like this:

{{ content|markdown }}

it should then render correctly.

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 1 week ago
5 200 10 hours ago
General · by lynbor, 6 days ago
2 131 3 days ago
General · by Old Man Umby, 1 week ago
1 106 1 week ago
General · by Sebastian, 2 weeks ago
1 131 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 254 3 weeks ago