# Querying from site.txt

**URL:** <https://forum.getkirby.com/t/querying-from-site-txt/4646>\
**Category:** Questions\
**Tags:** v2\
**Created:** [July 8, 2016, 2:09pm UTC](https://forum.getkirby.com/t/querying-from-site-txt/4646 "2016-07-08T14:09:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinko](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dinko/32/138_2.png) [@dinko](https://forum.getkirby.com/u/dinko)\
**Post date:** [July 8, 2016, 2:09pm UTC](https://forum.getkirby.com/t/querying-from-site-txt/4646/1 "2016-07-08T14:09:07Z")

</div>

I’m trying to use the “Option from other field” method as described for checkboxes in the doc: [https://getkirby.com/docs/cheatsheet/panel-fields/checkboxes](https://getkirby.com/docs/cheatsheet/panel-fields/checkboxes)

However, I cannot query from `site.txt`.

This is what I tried:

```auto
tasks:
    label: Tasks
    type: checkboxes
    options: field
    field:
      page: site
      name: project_tasks
      separator: ,

```

but it causes a fatal error.

Maybe it’s only possible to read from other pages’ fields? Reading from `site.txt` would be really useful for sitewide options.

Ideally, I was looking to use queries, and even more ideally, from a structure field in site.txt as already once described by @rhawbert in [Panel: querying "site.txt" structure fields as pages/subpages fields' values](https://forum.getkirby.com/t/panel-querying-site-txt-structure-fields-as-pages-subpages-fields-values/1960). But that doesn’t seem to be implemented.

Any idea? Thx!

---

<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:** [July 8, 2016, 2:10pm UTC](https://forum.getkirby.com/t/querying-from-site-txt/4646/2 "2016-07-08T14:10:24Z")

</div>

You can do it like this:

```auto
tasks:
    label: Tasks
    type: checkboxes
    options: field
    field:
      page: /
      name: project_tasks
      separator: ,

```

Edit: If you want to query a structure field, you can only do that either with a custom field or by creating an API from the structure field via a hook.

---

<div class="post-metadata">

**Author:** ![dinko](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dinko/32/138_2.png) [@dinko](https://forum.getkirby.com/u/dinko)\
**Post date:** [July 8, 2016, 2:12pm UTC](https://forum.getkirby.com/t/querying-from-site-txt/4646/3 "2016-07-08T14:12:49Z")

</div>

Cool, thx! I had only tried `/site` but not just the slash.

---

<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, 4:57pm UTC](https://forum.getkirby.com/t/querying-from-site-txt/4646/4 "2025-02-06T16:57:38Z")

</div>

Archived on February 6, 2025, 4:57pm UTC


