Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Wrapping my head around twig calls

Started by Muut Archive 11 years ago · 1 replies · 265 views
11 years ago

I jumped in head first the other day and I'm finding myself a little lost as I try to piece this together.

I'm in the process of creating my own template (actually converting a template from Templated that I liked the look of.) When I call {{ post.content }} nothing shows up. I discovered if I call {{ content }} I can get the content of the post (I started with the Blog Site skeleton as a framework.) But I can't get {{ page.title }} or images to show up.

As I try to figure out what the antimatter theme is doing for the blog parts, it's easy to get lost. What am I missing?

11 years ago

Okay, after playing around for it a bit more, I'm realizing that the page is loading item.html.twig, and I was thinking it was loading a different template page.

I think everything just clicked. I think I got it now. Thanks all!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago