# Access to Site and Page data in Elements API

**URL:** <https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944>\
**Category:** Elements API\
**Created:** [January 15, 2025, 1:11pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944 "2025-01-15T13:11:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [January 15, 2025, 1:11pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/1 "2025-01-15T13:11:43Z")

</div>

I was just looking through the [Elements Language Docs](https://docs.realmacsoftware.com/elements-docs/elements-language/api-introduction) and noticed there was no mention about what data from the site or current page was exposed to custom elements via the API?

For instance, I’ve been considering building a site nav that visually highlights the current page/section (ie. /about, /articles/\*, etc), but I currently can’t find anyway to ascertain which page (or path) the component is being used on. Essentially I’d like to be able to this:

- Home
- **About** `<!-- you are here -->`
- News
- Contact

And not just this,

- Home
- About
- News
- Contact

In order to be able to better indicate to users where they are in the site.  
This would also be essential for creating any sort of [breadcrumb](https://en.wikipedia.org/wiki/Breadcrumb_navigation) navigation within a site.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 15, 2025, 2:20pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/2 "2025-01-15T14:20:45Z")

</div>

Yup, you can do that! Here’s [a sample project](elementsapp://downloadDocument/ZStlVDlr4kHt) I’ve just put together that shows how to do it in a custom component.

---

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [January 15, 2025, 2:25pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/3 "2025-01-15T14:25:05Z")

</div>

Thanks @Dan! Are the available project and page properties documented anywhere?

Also, can you update the link for the sample file as it currently points to Cleanshot.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 15, 2025, 2:31pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/4 "2025-01-15T14:31:43Z")

</div>

Sorry, [project link updated](elementsapp://downloadDocument/ZStlVDlr4kHt).

Re: Page Properties; take a look at the doc below. If there’s anything else you need just let me know!

> **[Available Data | RapidWeaver Elements Docs](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/hooks.js/available-data)**
>
> Access Project Properties

---

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [January 15, 2025, 2:33pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/5 "2025-01-15T14:33:40Z")

</div>

Sorry @Dan, getting an error on the project link.

 ![CleanShot 2025-01-15 at 09.33.56@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/5/f/5fc56a5db1ed2ae505e67effe1b72112b454f8ff.png)

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 15, 2025, 3:09pm UTC](https://forums.realmacsoftware.com/t/access-to-site-and-page-data-in-elements-api/45944/6 "2025-01-15T15:09:24Z")

</div>

Sorry, try this one: [elementsapp://downloadDocument/ZStlVDlr4kHt](elementsapp://downloadDocument/ZStlVDlr4kHt)
