I change page template and my content disappeared

Now I’ve joined this forum, I feel lighter because there is hope that someone can help me get my content to reappear.

I am using MAMP on my Mac to play about and learn how to use Grav CMS before I redevelop my therapy website (currently online but hand coded and no blog pages).

I created a page in Quark, which looked fine, but looking for more functionality, I then added the Akazie Wood theme. The content was visible in the default template.

When I checked out how my page would look in the ‘home’ template, there was no content visible except the hero image and menu links below - that must be how that template is set up in that theme.

When I switched back to the default template, my content (about 300 words) was not visible. I had a look at the file and folder structure but couldn’t see what to do.

I am hoping that someone will Kindly have an idea of something simple I could do to get my content back so I haven’t wasted the time.

Surely this shouldn’t happen?

What’s your /user/pages structure currently? You should have something like /home folder (depending on how you named it) and inside it your default.md template with all the contents

@Mikeymu1 The question lacks a bit of details which makes it hard to guess what is happening.

When I checked out how my page would look in the ‘home’ template, there was no content

Looking at theme Akazie Wood, it appears its “home” template is in fact a modular template. Simply renaming file default.md to home.md will not work. See chapter Pages and more details about Modular pages to get an understanding about page types.

When I switched back to the default template, my content (about 300 words) was not visible.

When reverting home.md back to default.md should display the content correctly. I cannot reproduce that issue.

More details on how and what you have done might give more insight.

@pamtbaau Thanks, When I said there was no content, I mean, the following were visible: logo, menu, theme default image, and footer, but nothing else. The paragraphs, headings, and image were not visible that I typed in using the grav dashboard.

@Karmalakas Thanks. My folder structure is:

MAMP Websites > grav-admin > user > pages > mynewpage > default.md

I only have the free version, not MAMP Pro so cannot open the .md file and check its contents.

However, I can move files around on my mac.

Thanks for your answers. I just redid the page I lost. Guess I will have a look online for learning resources so I understand what the different templates in each theme look like.

@Mikeymu1,

Guess I will have a look online for learning resources so I understand what the different templates in each theme look like.

Unfortunately, there is no such learning resource… You will have to dig into the templates of a theme to get any insight.

My suggestion would be to first start with the documentation to get some insight into the concepts of Grav. Chapters 1, 2, 3 are most important to get a general feel for Grav.

You will then understand why template templates/home.html.twig of Akazie does not show the content of your home.md file as I mentioned above.

I would also suggest to stick to Quark for a while.

2 Likes

Thanks. Have done so.