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.

Themes & Styling

Learn2 theme - does it include modular.html.twig?

Started by Zuzana Fenclová 7 years ago · 3 replies · 900 views
7 years ago

Hi, I am new to GRAV and so far, it has not been a smooth ride.

I have selected Learn2 theme for my project. Using this theme, I wanted to see how modular pages work, but in the Administration Panel, the option is missing (I can add only a folder or a page).

When I access the learn2/template folder in shell, there are these twigs: chapter.html.twig, default.html.twig, docs.html.twig, error.html.twig and search.html.twig. The modular template is missing. On the other hand, in antimatter and quark themes, this modular.html.twig is present, along with the html.twigs mentioned above.

My question therefore is: have I done something wrong, or is modular.html.twig simply not present in the learn2 theme? Is there a theme similar to learn2 with modular.twig present?

Thanks for you time and help,
Sue

7 years ago

I can't believe I am the only person using Learn2 theme. Could you PLEASE have a look into your learn2/template folder whether modular.html.twig is present in your installation? ANYONE?

7 years ago

Hi @sue, the Learn2 theme is fairly unique as compared with other Grav themes and so there is not a modular.html.twig template included in the theme.

Many Grav themes do include something very similar to this template. Grav is quite different from many other CMSs where themes are often much more specific to the type of content typically used with them etc. When I was first learning about
Grav I found this Blog post helpful: https://getgrav.org/blog/traditional-cms-platforms-and-grav

Some themes that include the functionality of modular pages include Quark (the default Grav theme) and Bootstrap4. There are several complete skeletons for Quark and one for Bootstrap4 that you might find helpful to learn more about modular pages.

I've also found the Page Inject Plugin super useful when I want to embed a page (modular or otherwise) into another page: https://github.com/getgrav/grav-plugin-page-inject

Please let me know if the above answers your question.
Paul

7 years ago

Hi @paulhibbitts, thanks for your input and time. I need a theme for conservative users, menu on the left side is a must. Quark and Bootstrap4, cool as they are, do not provide this feature.

I will study the Page Inject Plugin and the Blog post, which you kindly provided. Hopefully it will allow me to pull parts of existing pages and combine them into a new one (as I imagine modular.html.twig does).

Thanks again, Sue

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 222 2 months ago
Themes & Styling · by Ian, 2 months ago
3 118 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 481 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 72 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 132 3 months ago