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

Default Page Not Defined in Learn2

Started by Muut Archive 10 years ago · 9 replies · 407 views
10 years ago

Greetings,

I get the following error when I use the "default" page file type in the Learn2 theme:

"400 - Template "default.html.twig" is not defined."

I'm trying to create some "basic" pages for Contact Us and a Muut forums page; Chapter and Docs file types wouldn't make sense for those.

Suggestions?

10 years ago

Create a user/themes/learn2/templates/default.html.twig with

TWIG
{% extends 'partials/base.html.twig' %}

{% block content %}
    {% include 'partials/page.html.twig' %}
{% endblock %}

That should work.

10 years ago

Nope, not there. But I'll try to add the above and let you know. THX!

10 years ago

Yes. By "should be there" I mean, we should add it to the theme :)

10 years ago

The learn2 theme is very specific to docs. There really is no need for 'default' because either a page is a topic or a chapter. Therefore only those are valid template types.

10 years ago

BTW, for your about-us page, simply use a topic template and don't include it in the 'docs' taxonomy.

10 years ago

BTW, should maybe remove the "default" selection and make either Chapter or Docs the new default selection in the dropdown, that would fix the confusion.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1355 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4065 9 years ago
Archive · by Muut Archive, 9 years ago
1 2953 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago