1

Not sure if I'm asking this question well, but I'll try... is there a way to have a field appear by default in all my single page?

Currently whenever I create a new single page I have to manually add a required matrix field (I got to settings > Sections > Edit entry type > etc.) I have no problem doing that, but I worry that less technical users will find this frustrating, make errors, and just give up.

Thank you so much for any pointers!

1
  • 1
    What is the workflow / scenario here? Why are your 'less technical users' able to create new sections at all? This implies you are allowing admin changes in production, which is … troubling :) That said, you could probably hook into the section creation to add a couple of fields automatically, but it would be pretty involved and fragile for a very small quality of life improvement.
    – MoritzLost
    Commented Oct 14, 2021 at 7:39

1 Answer 1

1

Frame Challenge – The question implies that you're allowing admin changes in production and/or are giving your editors / non-technical-collaborators admin privileges to create new sections, which is a recipe for disaster.

Creating new sections should be done by a developer in a development environment. This includes adjusting the section settings, defining the field layout, writing / assigning the template to use, testing the changes and finally commiting the updated project config to version control. From there it can be propagated to the production environment.

If you are allowing admin changes and creating new singles (or any other section) in production, you lose the ability to test and commit changes using a proper development workflow, because applying the project config from your development environment would override any changes made in production.

If you find that your editors often need to create singles with identical fields, you're probably misuing singles. Singles are meant for pages that you really only need one of – like an index page for a news feed/blog, a site-wide search or the homepage. If you need a bunch of "single" pages with similar fields, you should instead use a channel or structure. If you create a structure with a set of fields, your editors will be able to create new pages for that structure in production without having to touch the configuration and without any room for errors regarding the field layout.

1
  • 1
    Thank you so much for the thoughtful feedback. This was key and brought the point home: If you find that your editors often need to create singles with identical fields, you're probably misuing singles. Singles are meant for pages that you really only need one of – like an index page for a news feed/blog, a site-wide search or the homepage. If you need a bunch of "single" pages with similar fields, you should instead use a channel or structure. It makes perfect sense. Need to calibrate the approach.
    – mauricio
    Commented Oct 14, 2021 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.