Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

I change page template and my content disappeared

theme

Started by Michael Underwood 5 years ago · 7 replies · 1376 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

@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

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 stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago