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.

Site Feedback

There might be an error within theme-tutorial for 1.7

Started by Markus 6 years ago · 1 replies · 471 views
6 years ago

Hi folks,

I am currently building my own site from scratch, starting at the bottom with a theme. I followed all steps, even with using a default.html.twig containing

TWIG
{% extends 'partials/base.html.twig' %}
{% block content %}
    {{ page.content }}
{% endblock %}

as described in step 4 (https://learn.getgrav.org/17/themes/theme-tutorial).

I continued the other steps and after activating my theme, there was html markup shown instead of rendering it. A headline was shown as
<h1>My headline
and not My headline.

Then I had a look at the files contained in quark - and there was a subtle difference in default.html.twig:

TWIG
{% extends 'partials/base.html.twig' %}
{% block content %}
    {{ page.content|raw }}
{% endblock %}

I added the missing
|raw
and my theme worked.

Perhaps I am wrong, but you should have a look at the theme tutorials mentioned step 4.

Thank you and greetings,

Markus

5 years ago

Issue was solved by adding " | raw" at the mentioned code snippet.

Suggested topics

Topic Participants Replies Views Activity
Site Feedback · by pamtbaau, 21 minutes ago
0 0 21 minutes ago
Site Feedback · by Jarry, 3 hours ago
1 7 31 minutes ago
Site Feedback · by pamtbaau, 7 hours ago
4 59 6 hours ago
Site Feedback · by pamtbaau, 8 hours ago
4 20 8 hours ago
Site Feedback · by timkenhan, 3 months ago
2 81 8 hours ago