Sharing content model between pages

Hi everyone,

I'm facing a situation and I don't really know how to solve it:

  • I have several single types created on prismic
  • I have some content I want to share between these pages (like SEO title, description etc.).

The thing is, I believe I can't use slice here because it would make it possible to add several SEO Slices, which is not what I want here.

Any recommendation on how to approach this issue?

TLDR:

  • On each page I want a SEO block, which would be the same for each of my Single Type
  • I don't want to be able to create several times the same block within the page (Slice)

Thanks!

Hey Loki,

What about creating a new custom type for this SEO data then create a link from each single type document to the SEO document.

Then anytime you change the SEO information on the SEO document it would be carried to all the single types?

1 Like

Hi Jake,

Thanks for the answer.

If I create a custom type for this, I guess it would be the same SEO content for every page right?

My concern is to keep the same data model everywhere:

  • I want to be sure title, metadescription etc. will be defined with the same data model
  • I want to be able to customize the data per page created

Would it work with a custom type?

Could you not create a new tab in one of the single types with the data model you require for the SEO content then copy the SEO json from one single type tab to another in a code editor. You'll be able to check this has worked by going back to Slice Machine in the browser where you'll see it formatted correctly as a new tab.
Hope this helps.

Is there no way to automate it? If I don't do this manually, when creating a new single type, I could easily forget about it right?