Contentful logo

Contentful Community

Content preview URLs - get field value of linked model


I’m trying to configure preview in my online environment.
I have Page content model with slug field and Resource content model with pageGroup field (accepts only the Page model).
The issue is to set preview for the resource model as //host/entry.pageGroup.slug/
When I’m getting the id of the pageGroup in the way
//host/{} - it works right.
When I’m trying to get the slug field of the Page group in the way
//host/{entry.fields.pageGroup.fields.slug} - there is an error
‘entry’ in these examples is the Resource model.
Is there any possibility to have a slug value of the page model from the resource?

If it’s not very clear, feel free to ask me more questions, I will try to explain the issue in more details.

Hi Andrii, I am Alma from Contentful support :wave:

There are some limitations in the default content preview function, and you just observed one: it doesn’t resolve content of linked entries :sweat_smile:

As a workaround, you might want to use Content Preview API to build you own preview site. Content Preview API ( works has a similar setup as Content Delivery API, so you can leverage on your existing application to create the preview site.