# Child-pages not diplayed

**URL:** <https://forum.getkirby.com/t/child-pages-not-diplayed/9236>\
**Category:** Questions\
**Tags:** v2\
**Created:** [December 8, 2017, 5:43pm UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236 "2017-12-08T17:43:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielschmid](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/danielschmid/32/349_2.png) [@danielschmid](https://forum.getkirby.com/u/danielschmid)\
**Post date:** [December 8, 2017, 5:43pm UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/1 "2017-12-08T17:43:10Z")

</div>

I’m working on a site where every child-folder (section) creates a new section on the current page (parent).  
I’ve tried to setup a structure like this:

```auto
01-parent
— 01-section
— 02-section
— 03-section

```

Is there a way to use the same name multiple times in kirby (im not using those section pages with an url) Would be easy to implement different snippets base on page uid().

---

<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:** [December 8, 2017, 6:25pm UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/2 "2017-12-08T18:25:04Z")

</div>

That is not possible under the same parent, unless **maybe** if you don’t use the Panel (never recommended). But where’s the point if you want to use different snippets anyway and not the same snippet? In order to use the same snippet for different subpages, you might as well choose the correct snippet based on intendedTemplate/blueprint name or anything else these subpages share, or even a field where you choose the snippet to use.

Edit: So maybe you can provide at bit more information about what exactly you want to achieve so that we can find the best solution for your problem.

---

<div class="post-metadata">

**Author:** ![danielschmid](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/danielschmid/32/349_2.png) [@danielschmid](https://forum.getkirby.com/u/danielschmid)\
**Post date:** [December 8, 2017, 11:42pm UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/3 "2017-12-08T23:42:32Z")

</div>

@texnixe thanks for your answer. I found a solution that works for me.

```auto
01-parent
— 01-gallery-1
— 02-slideshow-1
— 03-gallery-2

```

Then i use uid() and strip the bit after the last dash. I then use the snippet based on uid(). So ever “gallery-x” uses the “gallery” snippet and so on. Works well.

```
<?php foreach( $page->children()->visible() as $section ) : ?>
<?php snippet( substr( $section->uid(), 0, strrpos( $section->uid(), '-' ) ), array('data' => $section) ) ?>
<?php endforeach ?>

```

Thank you

---

<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:** [December 9, 2017, 12:26am UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/4 "2017-12-09T00:26:22Z")

</div>

Well, that’s certainly an option. But if it was for a client, I’d vote for a more robust solution like intendedTemplate(). If the user doesn’t enter the title/uid as expected or changes it somehow, the site might break.

---

<div class="post-metadata">

**Author:** ![danielschmid](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/danielschmid/32/349_2.png) [@danielschmid](https://forum.getkirby.com/u/danielschmid)\
**Post date:** [December 9, 2017, 11:31am UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/5 "2017-12-09T11:31:46Z")

</div>

Thats a good idea. I hadn’t thought about that. Its way more robust. Thanks

---

<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:22pm UTC](https://forum.getkirby.com/t/child-pages-not-diplayed/9236/6 "2025-02-06T17:22:49Z")

</div>


