# Query for Select with value of site-blueprint

**URL:** <https://forum.getkirby.com/t/query-for-select-with-value-of-site-blueprint/20837>\
**Category:** Questions\
**Created:** [January 18, 2021, 10:42am UTC](https://forum.getkirby.com/t/query-for-select-with-value-of-site-blueprint/20837 "2021-01-18T10:42:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tilman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tilman/32/8664_2.png) [@Tilman](https://forum.getkirby.com/u/Tilman)\
**Post date:** [January 18, 2021, 10:42am UTC](https://forum.getkirby.com/t/query-for-select-with-value-of-site-blueprint/20837/1 "2021-01-18T10:42:36Z")

</div>

dear forum,

in my blueprint i am trying to fetch the children of a specific page for my select.  
the parent page of these children should be dynamic so my idea was to put a select field in the site.yaml and then use this value in my query:

site.yml:

```auto
containerpage:
  label: Containerpage
  type: select
  options: query
  query: site.children

```

mypage.yml:

```auto
relatedpage:
  label: Related Page
  type: select
  options: query
  query: site.find( {{ site.containerpage }} ).children

```

however this does not work. i managed to get the functionality i want via a siteMethod in a plugin, however that kinda felt like shooting cannons at sparrows so i am curious if there is in fact a smoother way to do it?🙂

---

<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:** [January 18, 2021, 12:05pm UTC](https://forum.getkirby.com/t/query-for-select-with-value-of-site-blueprint/20837/2 "2021-01-18T12:05:00Z")

</div>

> [@Tilman](#):
>
> `query: site.find( {{ site.containerpage }} ).children`

Try

```auto
query: site.find(site.containerpage.toPage()).children

```

You need to create a page object from the select field value. Why don’t you use a pages field instead of the select?
