is it possible to prepopulate a slug field from more than one field, e.g. from firstName + lastName #459
Answered
by
florian-lefebvre
stefanprobst
asked this question in
Q&A
-
with a content collection like this, is is possible to pre-populate the slug field from both import { config, collection, fields } from '@keystatic/core';
export default config({
storage: { kind: 'local', },
collections: {
persons: collection({
label: 'Persons',
// How to achieve `${lastName}-${firstName}`?
slugField: 'lastName',
path: './content/persons/*',
format: 'json',
schema: {
firstName: fields.text({ label: 'First name' }),
lastName: fields.slug({ name: { label: 'Last name' } }),
}
}),
},
}); |
Beta Was this translation helpful? Give feedback.
Answered by
florian-lefebvre
Jul 17, 2023
Replies: 1 comment
-
I think it's discussed in #340 so yeah, not available already |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
stefanprobst
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's discussed in #340 so yeah, not available already