Contentful logo

Contentful Community

Using linked entry field in preview url

Hi there,

I’m creating a blog using Contentful and I have 2 content types:

  • category
  • article

Inside article content model I’m linking a category (a reference). Inside category there is a slug field.
The final url to the article looks like this: {base_path}/{category.fields.slug}/{article.fields.slug}

I would like to set up preview for article, but cannot find a way to use category.fields.slug in preview for the article. Is there a way to do this?

Could you explain more clearly what you want to do? If you can preview the article, what do you need the category slug for, in preview?

The article url is dynamic, it includes category slug, as follows:
{base_path}/{category.fields.slug}/{article.fields.slug}

I’ve already got a response on another channel that it’s not possible in Contentful, but thanks for reaching out.

1 Like