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

I change page template and my content disappeared

theme

Started by Michael Underwood 5 years ago · 7 replies · 1017 views
5 years ago

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?

5 years ago

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

5 years ago

@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.

last edited 09/29/21 by pamtbaau
5 years ago

@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.

5 years ago

@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.

5 years ago

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.

5 years ago

@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

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 202 2 months ago
Themes & Styling · by Ian, 2 months ago
3 98 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 461 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 52 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 132 3 months ago