Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit some blueprints to one entry per collection #1204

Open
daun opened this issue Aug 6, 2024 · 2 comments
Open

Limit some blueprints to one entry per collection #1204

daun opened this issue Aug 6, 2024 · 2 comments

Comments

@daun
Copy link

daun commented Aug 6, 2024

I'd love to see a "singleton" mode for collection blueprints: hide the blueprint only if it is already in use in the collection, effectively only ever allowing a single entry of a blueprint per collection.

Example use case: a "pages" collection with the blueprints "page", "newsletter" and "contact". There can be however many "page"s needed, but there should only ever be a single newsletter or contact page as they have special meaning in the system. Crucially, unpublishing (or deleting) the newsletter page is used as a flag for hiding any newsletter functionality across the site.

There's a workaround: Create all entries of those blueprints, then hide the blueprints. The biggest flaw: when an editor deletes an entry with a hidden blueprint, they can no longer re-create an entry of that blueprint, as the dropdown hides the blueprint. Another issue is that hiding all but one blueprint will no longer show the blueprint title next to the page title in collection listings.

Screenshot 2024-08-06 at 19 35 58
@jackmcdade
Copy link
Member

jackmcdade commented Aug 6, 2024 via email

@morhi
Copy link

morhi commented Aug 15, 2024

Interesting idea! Maybe this could be changed to setting a number of max. entries using this blueprint instead of just fixing it to one entry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants