Content goes away after installing new theme

I just downloaded the latest grav notepad skeleton and tried two different themes. For both of them the menu and sample blog posts went away. I changed back to notepad and everything went back to normal.

This is something that is a bit different in Grav compared to other traditional CMS platforms. Each theme provides templates that are unique to that design and that means the content must use the supported template types that may not be provided by other themes. This means there is a close relationship between content and theme. You can’t just create content and switch between themes. Read this:

** Theme Basics and the Content/Template Relationship

This is actually a very powerful feature of Grav. It allows Grav to be used to create simple or complex websites. It allows Grav to be used to create completely different content and user interfaces.

The best advice I can give you is to download the skeleton package for each theme you want to look at. These contain Grav, content, theme, and plugins. Basically they are ready to go sample sites.

1 Like

I would do that, however, Afterburner2 isn’t available in the skeleton section.

Afterburner2 should work fine with the Blog, Onepage, and Shop skeletons. It closely mimics the page templates of Antimatter theme.

OK thanks, I tried blog and it works. One thing I am trying to work out is I tried adding a new folder and page, however, it is not appearing in the home page. I can go to the folder/link directly. I thought it should be an automatic process.

Oh interesting, I think it was the date, but it seems the system is on a different timezone since I had today’s date.

was the new folder added as 02.new-folder?

The number indicates to show it to appear in the menu.

Yah the date can be used to publish future posts, but that depend on the time on the server.

But I am running on localhost… maybe the VM I’m using is on a different timezone?

Could be, you should be able to type date in the terminal. That would be weird though. It could be a legitimate bug. If it is can you create an issue on github and i’ll take a look at it on monday?

Actually I know what this is! Your timezone is probably set incorrectly in your php.ini. You can either set it in that file and restart PHP (Apache/Nginx/FPM etc), or you can override the date setting in your /user/config/system.yaml file:

timezone: 'America/Denver'

For example is what I have mine set to.

Yeah, thanks, I did check the timezone and set it to mine, however, the minutes are way off which is strange. I looked into it briefly, but didn’t see anything obvious. I am using VirtualBox / Vagrant / ScotchBox for the dev environment.