Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template "default.html.twig" is not defined #6

Open
JohnnyBizzel opened this issue May 4, 2016 · 3 comments
Open

Template "default.html.twig" is not defined #6

JohnnyBizzel opened this issue May 4, 2016 · 3 comments
Labels

Comments

@JohnnyBizzel
Copy link

Not sure if this is a bug or me not knowing how to configure Grav.

Error is on line 345: RuntimeException
…/­system/­src/­Grav/­Common/­Twig/­Twig.php

@MATsxm
Copy link
Member

MATsxm commented May 5, 2016

Hi @JohnnyBizzel
It is difficult to answer without more information but, according to your title, it seems that the problem is related to the fact that you have a page of content (.md) called default.md but that there is no such thing as the corresponding rendering page default.html.twig that the system can not find it.

The concept is very easy. you always have a page of content xxx.md placed in user/pages that must be associated with a corresponding rendering page xxx.html.twig with the same name (not same extension) in user/themes/nameofthetheme/templates.

More information here:
https://learn.getgrav.org/themes/theme-basics#content-pages-twig-templates

Here, so:
either rename the default.md page to match an existing view or create (rename) an existing view called default.html.twig.
just for test, rename your page default.md to about.en.md, then clean caches and see what happen. 😉

@MATsxm MATsxm added the question label May 5, 2016
@MrityunjaiKumar
Copy link

MrityunjaiKumar commented May 24, 2016

This problem still persists, I have installed this theme from admin panel of the latest grav cms.
Even tried renaming the default.md to default.html.twig .

@MATsxm
Copy link
Member

MATsxm commented May 24, 2016

This is not what is written above, both default.md and default.html.twig, SHOULD exist as one is for the content, the other file for the view.
please follow what IS written:

just for test, rename your page default.md to about.en.md, then clean caches and see what happen.

(of course, the corresponding view about.html.twig should exist in the folder: templates/modular)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants