getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.59k stars 1.41k forks source link

Twig issue #814

Closed rbwilkinson closed 8 years ago

rbwilkinson commented 8 years ago

I have installed Grav easily enough. It is simply beautiful. Houwever with some templates I get this error:

RuntimeException (404) Template "modular/three-columns.html.twig" is not define

UPDATE: None of the templates are working... This is very odd. rhukster Thank you for the reply. I will investigate.

rhukster commented 8 years ago

As explained in the docs, the name of the page in your content 'three-columns.mddictates to Grav to use a Twig template file calledthree-columns.md. (This is can be overridden by settingtemplate: something` in page headers).

However, there is no requirement for a theme to provide a fixed set of templates, basically a theme provides the templates it needs to render itself. It's your job to ensure your content is using templates the theme provides. This allow Grav themes to be very different from standard 'CMS type themes' because there is a tight coupling between theme and content. I do cover this topic a bit in this blog post: https://www.getgrav.org/blog/traditional-cms-platforms-and-grav

So you just can't toggle randomly between themes and expect your site to be radically transformed, you need to start with a theme you like and build/modify your site with that in mind. This is why we have skeleton packages available for many themes, they are ready-to-run packages with Grav + Theme + Plugins + Content + Configuration.