Remove "Media Tag" from Create New Document menu? #43
-
Hi! What a wonderful plugin, thank you so much for making this Open-source and awesome :) Quick q: I tend to edit my available types in the "Create New Document" menu and realize creating Media Tags is useful to me in the plugin window context but not outside of it. How would you suggest me to edit it out of that list? Thanks + much appreciated, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @joaodotwork – you can configure the new document menu using Sanity's structure builder. Link to documentation Simply add the following to the {
"parts": [
{
"name": "part:@sanity/base/new-document-structure",
"path": "./newDocumentStructure.js"
}
]
} And in import S from '@sanity/base/structure-builder'
export default [
// Bring in default values
...S.defaultInitialValueTemplateItems()
// Filter out document types of `media.tag`
.filter(template => {
if (template.spec.id === 'media.tag') {
return false
}
return true
})
] Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey @joaodotwork – you can configure the new document menu using Sanity's structure builder. Link to documentation
Simply add the following to the
parts
array in yoursanity.json
:And in
./newDocumentStructure.js
Hope that helps!