# Doing get\_page in shortcodes make an error

**URL:** <https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475>\
**Category:** Uncategorized\
**Created:** [September 18, 2022, 7:55am UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475 "2022-09-18T07:55:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [September 18, 2022, 7:55am UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475/1 "2022-09-18T07:55:38Z")

</div>

I am flummoxed by this error. I can do

```auto
{% set z = get_page(path="blog/x.md") %}

```

on a my blog\_page.html template, but when I do it inside a shortcode, I get

```auto
Error: Reason: Failed to render 'shortcodes/link.html'
Error: Reason: Function 'get_page' not found

```

however, I can do

```auto
{% set w = get_url(path="blog/x.md") %}

```

in a shortcode

I know I am missing something very dumb,

(I am porting from Jekyll and it has this command ({% post\_url markdown\_file %}) which I need to replace with a shortcode, and need get\_page to get title) )

best, j

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 18, 2022, 8:37am UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475/2 "2022-09-18T08:37:31Z")

</div>

Not all functions are available in shortcodes. I think it’s mentioned somewhere in the docs but I can’t find it. In that case, we are still processing pages in parallel so you can’t access the other pages since we might not have it yet.

---

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [September 18, 2022, 8:56am UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475/3 "2022-09-18T08:56:40Z")

</div>

Thanks @keats

Good to know what is the cause. This is a bit annoying as my md are full of those (how one links blogs together, and is a nice Jekyll feature). I’ll add this to the python code converting the Jekyll md to Zola md, and my python pre-process of md to zola.

best, j

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 18, 2022, 6:03pm UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475/4 "2022-09-18T18:03:08Z")

</div>

Use the Zola specific link style then: `[my other page](@/blog/my/other/page.md)` which will be automatically set up correctly and will detect broken links

---

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [September 20, 2022, 11:04am UTC](https://zola.discourse.group/t/doing-get-page-in-shortcodes-make-an-error/1475/5 "2022-09-20T11:04:48Z")

</div>

Thanks @keats

Works perfectly.

Thanks for answering all the dumb questions.

best, j
