# Accessing transclusion parent page in queries

**URL:** https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094
**Category:** v1: Troubleshooting (legacy)
**Created:** [April 1, 2025, 10:05am UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094 "2025-04-01T10:05:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vxnick](https://community.silverbullet.md/user_avatar/community.silverbullet.md/vxnick/32/1167_2.png) [@vxnick](https://community.silverbullet.md/u/vxnick)
#### Post date: [April 1, 2025, 10:05am UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094/1 "2025-04-01T10:05:22Z")

</div>

I have a daily journal template and rather than update every journal page whenever I make a change to the queries, I’m experimenting with including the queries by transclusion.

However, I’ve noticed that `_CTX.currentPage.name` doesn’t inherit the page name of the calling page. My use case is to show incomplete tasks except any listed on the current (journal) page.

Is there another way I can do this or should I raise a feature request in GitHub?

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [April 1, 2025, 10:46am UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094/2 "2025-04-01T10:46:09Z")

</div>

I think `editor.getCurrentPage()` should always give you the “root” page (page open in the editor)? So this should roughly do what you hope for?

---

<div class="post-metadata">

### Author: ![vxnick](https://community.silverbullet.md/user_avatar/community.silverbullet.md/vxnick/32/1167_2.png) [@vxnick](https://community.silverbullet.md/u/vxnick)
#### Post date: [April 1, 2025, 10:55am UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094/3 "2025-04-01T10:55:47Z")

</div>

It does indeed, thank you!

---

<div class="post-metadata">

### Author: ![vxnick](https://community.silverbullet.md/user_avatar/community.silverbullet.md/vxnick/32/1167_2.png) [@vxnick](https://community.silverbullet.md/u/vxnick)
#### Post date: [April 2, 2025, 9:09am UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094/4 "2025-04-02T09:09:22Z")

</div>

Not sure if this is a bug or desired behaviour but I don’t think `editor.getCurrentPage()` is accessible in online mode (in edge).

I was trying to debug this last night to no avail until I randomly clicked the mode button which put me into Sync mode and my transcluded query worked again.

I think I read that online mode is disappearing in v2 so I’m not bothered about this being fixed but wanted to point it out 🙂

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [April 2, 2025, 4:06pm UTC](https://community.silverbullet.md/t/accessing-transclusion-parent-page-in-queries/2094/5 "2025-04-02T16:06:07Z")

</div>

> [@vxnick](#):
>
> Not sure if this is a bug or desired behaviour but I don’t think `editor.getCurrentPage()` is accessible in online mode (in edge).

That’s right. In Online mode SB will try to offload as much template rendering to the server, and on the server the editor.\* syscalls are not available (for perhaps obvious reasons). This split will indeed go away with Online mode in #v2, which is another side-benefit of this simplification.
