# Get content from multiple folders

**URL:** <https://forum.getkirby.com/t/get-content-from-multiple-folders/13293>\
**Category:** Questions\
**Tags:** v3\
**Created:** [March 9, 2019, 5:01pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293 "2019-03-09T17:01:37Z")\
**Posts on this page:** 5\
**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:** [March 9, 2019, 5:01pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293/1 "2019-03-09T17:01:37Z")

</div>

I try to get all articles in my different category folders from my news-page.

My folder structure looks like this :

```auto
1_news
   0_category
      0_architecture
          20190101_article-1
          20190102_article-2
      0_design
          20190103_article-3
          20190104_article-4

```

I’ve tried to get the news folder and then the category folder and the child-folders

```auto
$news = $site->find('news');
$category = $news->find('category')->children()->listed()->flip();

```

…but without luck.

---

<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:** [March 9, 2019, 5:03pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293/2 "2019-03-09T17:03:13Z")

</div>

Your using Kirby 3 but Please set the correct topic on the thread. I’m not sure how you have ended up with leading zeros either, did you create those manually? The numbering starts from 1 usually. Maybe thats the issue.

Sounds like you basically want the tree menu … [see here](https://getkirby.com/docs/cookbook/navigation/menus#tree-menu)

---

<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:** [March 9, 2019, 5:13pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293/3 "2019-03-09T17:13:32Z")

</div>

I’ve created those manually for alphabetical sorting.

---

<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:** [March 9, 2019, 5:16pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293/4 "2019-03-09T17:16:08Z")

</div>

You could do `var_dump($category)` to see what’s in it.

---

<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:** [March 9, 2019, 5:32pm UTC](https://forum.getkirby.com/t/get-content-from-multiple-folders/13293/5 "2019-03-09T17:32:31Z")

</div>

Thanks that helped.

I’ve came up with a simpler solutions.

```auto
# collections/news.php
return function ($site) {
   return $site->index()->filterBy('template', 'article');
};

```

It seems that you can get all pages using the same template wich makes it much easier to access the same kind of pages stored in different folders.
