cms
cms copied to clipboard
Use singular nouns in default blueprint handles and titles
The instructions say blueprint names should be singular: "Usually a singular noun, like Article or Product". However the default/fallback blueprint handle and title are copied from the collection, which is typically plural.
This is a bit annoying, and if you want it to be right you have to remember to change the file name after saving the default blueprint.
This PR changes the default blueprint handles and titles to use singular nouns.
~~If this was enabled by default I think it'd be a breaking change, as existing entries that are using a default/fallback blueprint will have the plural handle saved to the content already. That's why I made it a config option.~~
Love it! I don't think you'd need the config option though. Just look for the plural file if the singular one doesn't exist.
Oh I love this too! Let's get a review from @jasonvarga and hopefully get it merged it :D
Yes yes and yes!
I've updated this with @aerni's suggestion to remove the config option and just check for a singular blueprint instead. My implementation may not be the best way to do that, but it's certainly a much more elegant approach.
I've also had to update a couple of tests as they expected the default blueprint to match the collection name but they're now singular.
Cool cool. I marked this as a draft since you had started making some changes. Mark it as ready when you're done. 🙂
All ready now, had some test issues! 😄
Is this ready to merge?
Certainly ready for review. 👍
Love it! 🔥