I would like to have Content Models that have limit to the number of Content Entries that can exist or even get published at any given time.
For example, say I have a content model called “Home” and another “Contact”.
I will never have more than one Home page and probably never will have more than one Contact page either.
How can I prohibit the creation of more than 1 Content Entries of each Model?
I know that I can query / retrieve using the API only one of each but I want to limit the creation…
You can use a combination of several validations to allow there to only be one published entry of a certain content type. Make a short text field required, unique, and only accept a single predefined value. That will prevent an entry from being published if there is another entry already published of that content type.
Perhaps not a complete solution as there can still be many draft entries of the specific content type tho.
Thank you @charlie for this idea.
An indirect approach but works!
The fact that there may be multiple draft entries isn’t that bad,
considering someone might want to “swap” the published entries…