Create relationship to scheduled document

Hey guys, I’m running into a bit of an issue and was wondering if someone would be able to shed some light. So let’s say I have two document models, we’ll keep it simple and say we have one called “Page” and another called “Posts”. A page can link to many different posts, like so:

    "posts" : {
      "type" : "Link",
      "config" : {
        "select" : "document",
        "customtypes" : [ "post" ],
        "label" : "Posts"
      }
    }

Now let’s say I create a page called “Page 1” and I add a bunch of posts to it. Then a month later I create a new post called “Future Post” and I schedule this for a release. So it is currently unpublished but will be published in a release. I want that post to appear on “Page 1” when it’s released, but if I go to “Page 1” I am unable to link it, because it’s unpublished. So what I’d like is to add “Future Post” to “Page 1” and have them both included in a release.

Hopefully that makes sense, is that possible at all?

Hello Matt, welcome to the Prismic forum!

That was pretty clear!

You can do this by adding “Page 1” to the release as well, in the context of the release “Future post” exist and can be linked to it.

Ugh, that’s so obvious! Thanks Paulina. Is there a way, other than editing the document, to add it to a release? I couldn’t find anything immediately obvious. The easiest way I found was to just modify something, undo that change, and that would trigger the “save” state so I could publish it to a release. For example adding a space and then removing it. I saw that you could create new documents inside a release, but not “prep” existing ones for a release until something was changed. It’s not a big deal as it’s very easy to just change something, just thought I’d check.

Hey!

You are right, that is the correct way of ‘triggering the save state’, as you mention. It may not be super obvious, but yes, that is the correct approach.

If you need help with anything else let me know