# Section Plugin - show grandchildren of a certain page

**URL:** <https://forum.getkirby.com/t/section-plugin-show-grandchildren-of-a-certain-page/20176>\
**Category:** Questions\
**Tags:** v3\
**Created:** [November 27, 2020, 3:41pm UTC](https://forum.getkirby.com/t/section-plugin-show-grandchildren-of-a-certain-page/20176 "2020-11-27T15:41:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pju](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pju/32/6716_2.png) [@pju](https://forum.getkirby.com/u/pju)\
**Post date:** [November 27, 2020, 3:41pm UTC](https://forum.getkirby.com/t/section-plugin-show-grandchildren-of-a-certain-page/20176/1 "2020-11-27T15:41:15Z")

</div>

Hi there

I have question regarding custom section plugins. After a Kirby update, it seems page sections allow only a single parent. Before, I could use a collection of parents (hacky and was never supposed to work, but it did).

**What the plugin should achieve:**  
It should show all listed grandchildren of a certain page that have a certain template. A simple list ist enough (I can use the existing panel components, no problem).

**What’s not working:**  
I’m not sure how to best go about getting the data of the relevant grandchildren pages into vue. I thought I could use a regular kirby query in the computed props of the PHP file, like this:

```
'computed' => [
    'myPages' => function() {
        return kirby()->page('grandParentPage')->grandChildren();
    }
]

```

but the result in vue is an object that has the correct page uids as keys, but is otherwise empty.

Then I thought it would be better to use the REST API, but there I can only find an endpoint for child pages.

Do I really have to query my `grandParentPage` for children and then query every child for its children or is there a better way for this in Kirby?

Any help to put me in the right direction would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [November 27, 2020, 3:44pm UTC](https://forum.getkirby.com/t/section-plugin-show-grandchildren-of-a-certain-page/20176/2 "2020-11-27T15:44:57Z")

</div>

Are you aware that there is already a plugin for displaying any set of pages:

> **[rasteiner/k3-pagesdisplay-section](https://github.com/rasteiner/k3-pagesdisplay-section)**
>
> K3 plugin: display any page list in a section. Any parent, many parents, filtered, don't care. - rasteiner/k3-pagesdisplay-section

If you still want to roll your own, check out the source code of the plugin.

---

<div class="post-metadata">

**Author:** ![pju](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pju/32/6716_2.png) [@pju](https://forum.getkirby.com/u/pju)\
**Post date:** [November 27, 2020, 4:01pm UTC](https://forum.getkirby.com/t/section-plugin-show-grandchildren-of-a-certain-page/20176/3 "2020-11-27T16:01:19Z")

</div>

No I wasn’t aware 😅  
That’s the perfect solution though, thanks a lot.
