# Panel. Blogposts in subfolders. Best practice?

**URL:** <https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502>\
**Category:** Questions\
**Tags:** v2\
**Created:** [May 26, 2018, 8:53am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502 "2018-05-26T08:53:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![polyester](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@polyester](https://forum.getkirby.com/u/polyester)\
**Post date:** [May 26, 2018, 8:53am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/1 "2018-05-26T08:53:52Z")

</div>

I’m trying to build a _micro-blog_ and for that i want to have my blogposts in subfolders (blog/year/month/blogpost).

Is it correct that there has to be a `year.txt` file (e.g. 2018.txt) in every year folder and a `month.txt` file (e.g. 05.txt) in every month folder for showing the correct folder name in the panel?

And than i need a yaml blueprint file for **every** single month and year to get this working? Or is there a better/simpler/more professional way to do it?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [May 26, 2018, 9:57am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/2 "2018-05-26T09:57:22Z")

</div>

I think you can do this with routes, without getting crazy with the folder structure & blueprints. [See here](https://getkirby.com/docs/developer-guide/advanced/routing#simulating-wordpress-urls).

---

<div class="post-metadata">

**Author:** ![polyester](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@polyester](https://forum.getkirby.com/u/polyester)\
**Post date:** [May 26, 2018, 10:38am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/3 "2018-05-26T10:38:04Z")

</div>

But that only simulates a folder structure. For the micro-blog and because Kirby needs a title for every post, i need the folder structure (year/month/blogpost) to avoid title collisions.

---

<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:** [May 26, 2018, 11:55am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/4 "2018-05-26T11:55:27Z")

</div>

If you create your pages via the panel anyway, the text files are created automatically. So you don’t have to do any extra work. And you only need to create one blueprint for years and one for month, or just use the default blueprint for such container pages.

Having said that, you probably only want to allow certain page types as subpages, for example, the blog should only ever have subpages of type year, a year subpage only subpages of type month, and finally a month only subpages of type post. So it makes sense that each of these page types have their own blueprint that controls what is allowed and what is not.

If you don’t use the Panel to create your structure and you do not add a text file to a folder, the page is still show in the Pages list in the Panel, but referenced by it’s UID instead of the title. However, if you should happen to save such a page, a text file is created, but mind that it might not be the right page type then.

So, best practice:

- blueprint for blog (limiting subpages to year)
- blueprint for year (limiting subpages to month)
- blueprint for month ( (limiting subpages to post)
- blueprint for post

---

<div class="post-metadata">

**Author:** ![polyester](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@polyester](https://forum.getkirby.com/u/polyester)\
**Post date:** [May 27, 2018, 8:15am UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/5 "2018-05-27T08:15:59Z")

</div>

Yes! That works. Perfect. Thx. 🙂

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:28pm UTC](https://forum.getkirby.com/t/panel-blogposts-in-subfolders-best-practice/10502/6 "2025-02-06T17:28:05Z")

</div>


