Populate all pages with default value for new field #7386
Unanswered
petemolinero
asked this question in
Q&A
Replies: 1 comment
-
Yup. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm thinking through the impact of adding fields to a blueprint on an existing site, and have a question. Here's a contrived scenario:
Let's say I have a
pages
collection with 100 entries in it. Then one day I decide I want to add arating
text field to thepages
blueprint; it will have a default value of3/5
. So I add the field, and I add{{ rating }}
to mypages
template to display the rating. I go to my pages, and nothing is rendered—because none of the pages have a value forrating
yet.Now, if I go in and edit a page, I see that the default
3/5
is populated in the field—so if I save it, the page will now have the default value. Makes sense.But, is there a simple way to propagate default values to all entries after creating a new field without having to go and save them all one at a time?
Beta Was this translation helpful? Give feedback.
All reactions