# 3 times a blog. How to make 3 pages with 3 sections dynamic?

**URL:** <https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069>\
**Category:** Questions\
**Tags:** v3\
**Created:** [July 26, 2019, 2:03pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069 "2019-07-26T14:03:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 26, 2019, 2:03pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/1 "2019-07-26T14:03:42Z")

</div>

I am stuck. I have a static html site, that I want to tranfer into Kirby. I have 3 pages with a topic:

Banana

Guave

Orange

——

Each page has 3 sections, so (apart from header/ footer etc.) the pages look like this:

Banana Infos

Banana Pictures

Banana News

—

Guave Infos

Guave Pictures

Guave News

–

Oranges Infos

Oranges Pictures

Oranges News

—

My site yml just has preset:pages.

I have 3 content folders:

3\_Banana

4\_Guave

5\_Orange

—

Inside the 3 content folders:

banana.txt

Folder: „article-banana“

Inside: article-banana.txt

guave.txt

Folder: „article-guave“

Inside: article-guave.txt

oranges.txt

Folder: „article-orange“

Inside: article-orange.txt

All article-fruit.txt files have the fields:

Title:

* * *

Text:

* * *

Files:

* * *

Date:

* * *

Author:

* * *

Tags:

——

I made the corresponding blueprints in blueprints/ pages/

banana.yml

banana-article.yml

guave.yml

guave-article.yml

orange.yml

orange-article.yml

—

Since I copied the blueprints from the cookbook, I have

„ extends: sections/articles“

in the yml-files of the fruits. I guess this is the first source of mistake.

—

And I made the templates

banana.php  
banana-article.php

guave.php  
guave-article.php

orange.php  
orange-article.php

—————————

Problems:

When I make a new post from the first level of the backend I can choose several article types, like banana-article etc. If I choose „banana-article“ I get the correct article type, but it chooses the template for the homepage. Also, it doesn’t appear on the banana page. Some with the other fruits.

So, I need to change - what?

Also I can choose article types of just „banana“. If I do so I can choose another article type called „article“ with the standart layout for subpages and files. Not the layout with the meta stuff, that I defindes in my „banana-article.txt“

Also I have to choose which position in the menu, which I don’t want.

Were? Did. I.Go.Wrong?

It feels like I chose the wrong way to achieve my goal.

PS: Later I want to change the post type of the pictures articles and I also need to figure out how to make the navigation work.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 26, 2019, 2:14pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/2 "2019-07-26T14:14:10Z")

</div>

I can’t concentrate a lot today, but first question:

Why do you use different content text files for the same sort of stuff?

If they all have the same fields, they should probably share a blueprint/template?

So I would use a `fruit.yml` blueprint and a `fruit-article.yml` blueprint.

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 26, 2019, 2:29pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/3 "2019-07-26T14:29:39Z")

</div>

But how does Kirby then know which template to use? I guess that is still a mystery for me. Edit: Oh by the content folders, right?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 26, 2019, 2:43pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/4 "2019-07-26T14:43:03Z")

</div>

Do you want to use different templates for the main pages? Then you can do one of two things:

1. If they have the same type of content, use one blueprint & template, but different snippets for the different layouts

2. Use different templates/blueprints like you had planned above.

Since the subpages only deliver content for the parent (the three sections, they can in any case share the same blueprint (they then don’t need a template at all)

The name of the text file (and hence the blueprint) determines the template that is used to render the content.

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 26, 2019, 5:34pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/5 "2019-07-26T17:34:22Z")

</div>

The templates for each fruit-topic are the same.

fruit-infos: ~3 excerpts/ intros with links to the corresponding articles. Plus a back link.

fruit-photos: a slider with photos. Each photo could be a figure with figcaption, wrapped in a link, that leads to a page with a grid of fotos with some more informations to it. Like a grid of divs with a photo in each and some text fields in each.

fruit-news: ~3 excerpts/ intros with links to the corresponding articles. Plus a back link.

I chose different content folders and different blueprints and different templates just because it means less complexity for my brain. But I know its more work.

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 26, 2019, 5:37pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/6 "2019-07-26T17:37:40Z")

</div>

What is the number with the underscore for in the content pages folders? I can’t find an explanation. Is it for an automatic menu?

---

<div class="post-metadata">

**Author:** ![warg](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@warg](https://forum.getkirby.com/u/warg)\
**Post date:** [July 26, 2019, 5:38pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/7 "2019-07-26T17:38:28Z")

</div>

I think, you should use one template for all of them and you should unite/make one for fruit-infos and fruit-news because it’s at the end the same structure like you wrote here.

I think your issue is a bit bigger because at the end, you have different open questions. In my point of view, we should reduce the complexity step by step and then it will be easier for your brain to understand the whole thing. It’s hard to try to solve a problem/complex situation without splitting it into different sub-issues, like you did.

For example to limit the templates you can choose from, you could create a blueprint with type `pages` like in this example for `articles.yml`:

```auto
type: pages
headline: Articles
info: "{{ page.creation_date.toDate('d.m.Y') }}"
template: article
empty: No articles yet
sortBy: creation_date desc

```

(see the `template` option)

---

<div class="post-metadata">

**Author:** ![warg](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@warg](https://forum.getkirby.com/u/warg)\
**Post date:** [July 26, 2019, 5:39pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/8 "2019-07-26T17:39:41Z")

</div>

The numbers/missing numbers in the directory/folder names are used to determine the status of a page: in draft, in review or published.

You can read more about it here:

[https://getkirby.com/docs/guide/content/publishing-workflow#page-states](https://getkirby.com/docs/guide/content/publishing-workflow#page-states)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 26, 2019, 5:42pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/9 "2019-07-26T17:42:21Z")

</div>

There’s also different numbering schemes for listed pages, you can find information about the numbering schemes here: [https://getkirby.com/docs/guide/content/publishing-workflow#listed-pages](https://getkirby.com/docs/guide/content/publishing-workflow#listed-pages)

As regards the listed, unlisted and draft states: As far as I know, you have worked with Kirby 2 before, right? `Listed` is the old “visible” status, `unlisted` the former `invisible` and the `draft` state is new.

I think it’s probably a good idea to go through the first few chapters of the guide to get a general overview.

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 26, 2019, 5:49pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/10 "2019-07-26T17:49:11Z")

</div>

Yes, I Kirby 2. I did read thru the guide. I have several open tabs with it.

Let me beat my head against your answers and the guide for just a while. I come back later.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 26, 2019, 5:50pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/11 "2019-07-26T17:50:02Z")

</div>

👍

---

<div class="post-metadata">

**Author:** ![warg](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@warg](https://forum.getkirby.com/u/warg)\
**Post date:** [July 26, 2019, 5:52pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/12 "2019-07-26T17:52:55Z")

</div>

I’m sure you will find the proper solution to your need! I had the same starting issues and I’m becoming more and more fluent with Kirby 3. It’s not too easy but saves a lot of headache and issues later on. As always, we are here to help each other 😉 .

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 26, 2019, 8:49pm UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/13 "2019-07-26T20:49:18Z")

</div>

Split this topic on July 26, 2019, 8:49pm UTC

12 posts were split to a new topic: [How to specify the templates that are allowed for the first level of pages](https://forum.getkirby.com/t/how-to-specify-the-templates-that-are-allowed-for-the-first-level-of-pages/15075)

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 27, 2019, 1:55am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/14 "2019-07-27T01:55:23Z")

</div>

The first problem I had was that I had a sections folder with a articles.yml and a„ extends: sections/articles“ in … äh … some other yml file. This was the main confusion. It is in an example for the blog, but not in the cookbook recipe. But I can’t find it anymore.

Stripped it out an chose “create” for a list of possible templates and it all behaved like I expected.

Now I can see the bigger problem, that I have with all the content I have to pull into all those sections on the pages. Now I understand how snippets will help me.

I will:

- make 3 templates for each fruit page. Throw aways the article.php template but use snippets.

- put snippets into each info or news section of each fruit page, so I can pull news or infos into each of them on every fruit page. These snippets are all the same article templates with a different title.

Not sure about the yml files to use the snippets instead of articles?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 27, 2019, 5:55am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/15 "2019-07-27T05:55:00Z")

</div>

> [@Ndugu](#):
>
> make 3 templates for each fruit page.

In what way are these fruit pages different? I’m not sure you really make your life easier if you use different templates for the same thing. It means more files and any changes would mean you have to make these changes in multiple places.

> [@Ndugu](#):
>
> Not sure about the yml files to use the snippets instead of articles?

There are no yml files for snippets. Yml files (blueprints) are “page based”, that is, each content folder has a text file with a specific name, the name depends on the blueprint selected when the page is created. If you create a new page via the Panel, and in the create dialog you choose `template: note` then this will create a content file called `note.txt` (or `note.languagecode.txt` in a multilang install).

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 27, 2019, 11:35am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/16 "2019-07-27T11:35:16Z")

</div>

> [@texnixe](#):
>
> In what way are these fruit pages different? I’m not sure you really make your life easier if you use different templates for the same thing. It means more files and any changes would mean you have to make these changes in multiple places.

The headline ist different… 😉

I decided for 3 templates just because I don’t fully understand how to pull it off with just one. But maybe I get it when I do it.

And - I don’t know how the site will evolve over time. Maybe content and therefor Layout will change, I don’t know yet.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 27, 2019, 11:36am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/17 "2019-07-27T11:36:51Z")

</div>

> [@Ndugu](#):
>
> The headline ist different… 😉

Which headline? In the blueprint? Or in your content?

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 27, 2019, 11:46am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/18 "2019-07-27T11:46:15Z")

</div>

In the content. There is a Headline in each section, that is hardcoded. Ok, I know, I could make it dynamic… 😉

---

<div class="post-metadata">

**Author:** ![Ndugu](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@Ndugu](https://forum.getkirby.com/u/Ndugu)\
**Post date:** [July 27, 2019, 11:52am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/19 "2019-07-27T11:52:47Z")

</div>

Edit: Don’t want to show what was here anymore. Wasn’t so relevant anyways.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 27, 2019, 11:57am UTC](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069/20 "2019-07-27T11:57:06Z")

</div>

> [@Ndugu](#):
>
> In the content. There is a Headline in each section, that is hardcoded. Ok, I know, I could make it dynamic… 😉

You should, that’s the whole purpose of using a CMS.

Having said that, it is of course totally up to you what you do with Kirby. But we are here to try and teach you how to get the most out of it. It doesn’t really make sense to have to go into a template to change a headline instead of changing it through the Panel.

[Next page](https://forum.getkirby.com/t/3-times-a-blog-how-to-make-3-pages-with-3-sections-dynamic/15069.md?page=2)
