Activate modular template

just installed grav, great! Now, how do I activate the modular template?

Hi Nuno,

welcome to the Grav community!

Conerning your question I don’t know, if I get your point. Out of the box, you can split your content into different files and combine them into one file as modular (content) parts. The One-Page Site skeleton

is a great example of that. Just look into the files located under user/pages, which maybe answer your question. If not please let me know.

Thanks @sommerregn :slight_smile: was typing similar.

For a new user, it might be simpler to download the OnePage Skeleton ZIP file from the downloads page

@rhukster: :slight_smile:

Ok, So I need to activate the onepage theme? Just replace the animatter by that one in the config file, right? Or that option already comes with the default theme?

I’ve to say, that the documentation for someone that is used to “regular” cms is a bit confusion, special for these themes concept…

It is not like joomla or wordpress with positions. If you need a New design, than create a new for that page

@nuno, this is something I clearly need to document better because this same confusion has come up a couple of times, but let me try and summarize (it’s still a pretty long read :).

First, try to leave your traditional cms conceptions behind for a minute. Those platforms are built differently. Basically WordPress, Joomla, etc, have pretty strict database structure meaning that you have to create content that conforms to the platform in question. Often, this means that you have to construct your pages in ways that are not friendly, intuitive or economical. Once you have however, you can then change themes, perhaps having to tweak your content in order to have things look OK. This approach makes creating content Hard but switching themes Easy. This only really benefits the developer who might want to change themes occasionally. The downside is, that it makes it very hard for the user to create content, something you need to do much more frequently!

Grav, takes a different approach. It’s a modern cms that relies on a greater relationship between content and t heme. What this means to you, is that there are very little restrictions in place. Writing content is simple, and building pages is more friendly, intuitive, and even fun! Because Grav doesn’t have a rigorous database structure (in fact no database at all), you are not restricted into conforming to the platform in any way. However, this means that there is no reliable structure for themes to hook into and rely on. This is not a negative though, it means that a theme is not limited to the platform, and it doesn’t have to support every little thing the platform supports. It only has to support what the content needs!. In short, it means that your content and your theme are tightly coupled.

Usually when building a site, you decide what it needs to look like, but this is done in conjunction with what your content is going to be. You think about these two parts at the same time, and this is the way Grav works. You can pick a theme/skeleton that is closest to your end-goal, or start creating from scratch.

Antimatter is a bit of an aberration, as it supports a few different types of content. These are exemplified in the default Grav install (simple page), Blog Skeleton (multipage blog example), OnePage Skeleton (Modern single page built with modular sections), and Shop Skeleton (multipage catalog with JavaScript Shop script). They all use the same Antimatter theme, just with different content examples. The skeleton packages are akin to RocketTheme RocketLaunchers, ie, a ready-to-go package. Just extract the zip, and point your browser at the directory, job done! They include the Grav core, User pages, theme, and all plugins required.

Most other themes in the downloads section are very specialized. They only support a certain set of pages and/or functionality. The theme/site design only provided for certain set of functionality, and Grav is happy to oblige because it’s supremely flexible, unlike traditional CMS platforms. Most of these themes either come as a skeleton package (so you can get a working example with all the functionality), or with sample pages included in the theme. These sample pages can be copied into your user/pages folder to get a similar experience as a skeleton package.

What this tight coupling between content and themes actually means, is that you don’t really think of a theme as a skin for you content. A theme is really theme+content which equals an entire site design.

Ok, that’s a lot of info. hopefully that helps :slight_smile:

Updated, tweaked as blog post: