Referencing data from one doctype to another

Hi Prismic Team,

I have a question regarding content setup, namely, I’m wondering if it‘s possible for document types to be able to reference the data from other doc types. For example... I have document type „podcast“ where I save data such as podcast title, episode count, etc. I also have a document type „Host“ where I save a library of hosts and their information e.g. name, social media links, etc.

I would like to be able to add hosts as part of the podcast page content, but not have to create the data again. It would be awesome to be able to reference a field from inside the host doctype, e.g., name, such that a content editor would have a list of available names to choose from.

Example, let’s say I’ve added three hosts, Sue, Shirley and Steve. I also have a podcast document, „My Podcast“, for which Sue and Steve are hosts of. I would love to be able to display all three hosts inside a dropdown or similar, and be able to choose which apply, i.e. Sue and Steve. Is this possible? I hope I've described what I'm trying to do clearly.

Thanks already for your help and Happy New Year!

Hello @patrick3, welcome to the forum, and happy new year to you too!

You can easily do this by adding a Custom tagging system:

This way, you can add your Host type documents using Content relationship fields inside the Podcasts types.

Afterwards you query the Podcast docs and use fetchlinks to get the fields you need from the linked Host documents!

1 Like

This issue has been closed due to inactivity. Flag to reopen.