Template "modular.html.twig" is not defined

I’m one day out with Grav. I installed the skeleton of Quark and the Admin plugin. Both work fine.

Within Admin I installed Mediator to see if one can change themes as easily in Grav as in WordPress… and now I get the ‘twig’ error.

I saw some posting on this but all were too detailed for someone with a day’s experience with Grav (but ten years experience with Word Press.)

How do I fix this?

Thanks.

hi dev77,

Welcome. I too just am getting started with Grav CMS and come from a background of working in Wordpress.

I think the error is caused because Quark has many more templates it uses. Installing Quark skeleton first created all the pages, like the modular pages and blog and posts pages and I don’t think Mediator has templates for those pages.

You could manually change the page types or create the missing twig templates but it is a bit of work from what I can tell and probably not good for just starting.

What I find easier is to use Theme inheritance ( like creating a child theme in Wordpress ).
Install your Quark Skeleton or which ever you like and then create a child theme to make modifications. Just be sure to use the Devtools to create the inheritance theme.

You can set your theme back to quark manually by editting /user/config/system.yaml

change:
pages:
theme: mediator

to

pages:
theme: quark

Maybe one of the experts can give some feedback what it the best approach to dealing with missing templates. Copying from one theme to another theme all the missing templates I would think would make a mess of the site.

dev77,

I seen that coolman01 mentioned in another post about using Gantry with Grav CMS.
Coming form Wordpress you might find it a little more familiar as it has a area to work with layouts and colors visually. You will need the Gantry 5 plugin and the Hydrogen theme.

The other thing I did at least for testing was to use the TinyMCE plugin and use tables for the layout and some css to make the tables responsive. I was trying to think of what would be easy for a client to work with. Tables are very simple, clean and easy to align items in a table, add color, backgrounds, padding, etc. You can see a sample here: http://toms-sandbox.com/grav/ also added a sidebar on a few of the other pages.

There is also a Grav Premium that includes a better Editor but I have not worked with it as of yet.

Thanks for the replies.

I run a ten year-old web design shop which does sites mostly for the publishing industry.

I’m always on the lookout for new tech that might allow us to create sites faster and “better” and more "movable’ than WordPress.

We gave up on the JAMstack methodology as it it is just not mature enough for us to stake our company on it!! But I am watching it.

There are a bunch of flat-file CMS platforms out there and since Grav is the best known we thought we’d start here.

I don’t expect any “new” flat-file platform to do everything that a mature server-based CMS can do but if I can’t import a new theme and have it work out of the box… and if I can’t quickly figure out why it doesn’t work it is a non-starter.

Grave has promise for sure, but they need to make the “simple” and basic things work before they get into polymorphism, inheritance, etc. I pay our people $50 an hour. I can’t afford to have them spending hours trying to get a simple theme to work.

I do understand. You did install a complete site with all its settings and then tried to replace it with a theme that did not support all those customization. The same thing would happen in Wordpress as well. I think over all Grav is much easier to work with. Fixing problems seem to be easier as well as many times it is just editing a file or a template. Another things that is great is the ease of backing up, testing your backup and transferring a site. I copied my user folder from a site today to a fresh install. Had the site moved in a few minutes, no issues.

I am not using Grav CMS for development yet though because I just started using it like 2 days ago and want to be comfortable enough with it before starting a project with it. I would bet the people from your company could master Grav CMS in a short time. Everything is set up so much simpler. I know many people are comfortable with their page builders in Wordpress which is why I suggested taking a look at Gantry. Also, there are lots of Particles available for it. They are like modules you would see in a builder live Elementor or Divi.

Anyway, I hope you stick with it. Unless you need something right away to switch to. Take your time and become comfortable with it for when you do decide to switch.

BTW,
There is a Grav Discord Channel if you are interested.

First I downloaded Grav + Admin and installed it and the default Quark theme did not work. I could not get past the default “Welcome to Gave” or whatever page.

So I created a new directory and this time installed the skeleton of Quark. That worked out of the box.

Next I added the Admin plugin and that works fine.

Using the Admin I installed the second theme… Meadiator but I can’t get it to work… Quark is still showing up. So I deleted it and have just been playing with Quark.

Compared to WordPress this has a one hell of a learning curve for anyone with only WP experience.

BTW the "watching’ notification thing does not work. I never get emails when someone replies to my posting. I know the email works because the forum sent one to me to verify it when I first came on.

Are you running on a local server or online? I know on my local server I have had permission issues.

I agree. It can be a lot to take it at once. That is why I suggest just taking your time learning it.

I think the Discord channel is where everyone hangs out. I need to start using it myself.

I’m running online on my own dedicated server.

Hi, I just wanted to mention that with Grav everything (layout and logic) is contained within the theme so switching themes is possible but not really seamless. If you use plugins you’ll need to manually update each template with the twig snippet(s). A new layout feature like an hero image section will need the twig template and admin blueprint copied over into a new theme to use it.

I’m converting a bootstrap site to tailwind - this is basically rebuilding the site again as all the logic for the panels is in the theme along with the styling.
There is a premium theme built on tailwind, it looks very configurable from within the admin panel but I haven’t tried it.

I think what you said above is an important factor to understand and part of what I think is a rather steep learning-curve.

So far the only advantage I’ve seen that Grav has over traditional CMS platforms is portability.

I’ve not seen major speed and performance gains, but I have a fast server that is underutilized. Perhaps on shared hosting there might be better stats.

Bottom line I’ve yet to see a compelling business advantage of Grav over any of the traditional CMS platforms out there… except perhaps for the large company that has a talented and dedicated IT department. But I’d think such a company would be better off with the JAMstack platform which to me is just as difficult and convoluted and Grav it, but has much better performance stats.

I’m going to look at Pico next.