Pull in the slug of a reference field into a nested collection list, embed element

Hello!

I’m trying to construct a link using an Embed element, in the second level of a nested collection list. The URL needs the slug of the CMS item that the current item references, as well as its own slug, to make an anchor link.

Essentially, the goal is to make a navigation element, where you can go to a page, and on that page is a CMS list of all of its subpages, with the content present. By clicking on a subpage, the link would take you to the parent page, but anchor to the subpage section.

So, to make the link to the Azure sub page work, I need an Embed element to reference the slug of the blue page, and the slug of the azure sub page, like this:

https://base.url.com/blue-page#azure-sub-page
or more generally
https://base.url.com/{{parent.slug}}#{{current.slug}}

But when I pull up the insert field menu in the embed, when it is in the nested collection list, I only see the Azure (subpage) fields. I do not see the fields of the Blue page, even though in the CMS, I am referencing the blue page on the azure entry.

Is this just a limitation of the Embed element and nested collections?

Thanks!


Here is my public share link: LINK

2 Likes

My question exactly. Did you find an answer or come up with a solution?