Hey,
I couldn't locate any info on this. Is there option to override Publish changes
button functionality?
Second question: Can I query DB for all draft documents? I saw preview function that can send whole draft to the frontend, but I would like users to be able to save like ~10 different drafts and sort of preview all of them. Is that possible?
Third question: Is there a way to batch publish multiple documents together?
Hey @adam-mrozik — good question!
Publish changes
button is currently not possible, but it would be a great addition. We would accept a PR to add this functionality for sure. It would just function like how swapping in a custom component works now - except you'd swap in your own Publish
button. Would be cool. Can I ask what you're looking to do with this?where: { _status: { equals: 'draft' } }
. But that will not send back pages that have been published, but have newer drafts available. To get both all pages that have never been published, as well as all pages that have newer drafts available, you would need to use the draft: true
argument and then filter the results manually in your app(s)._status
to 'published'
, but that would need to be a script. There is no endpoint operation available for this but it could be easily done with a custom endpoint or script.How's that?
Wow, Thanks for very quick answers!
Just for the context:
are you sure you want to deploy document to PROD?
.Save Draft
saves the document and makes it visible on Staging website, while Publish Change
would push data to to the PROD website. This way I can have only one Payload CMS and one place for internal employees to edit documents and also publish them to the default site.