import T from '@sanity/base/initial-value-template-builder' export default [ ...T.defaults(), T.template({ id: 'lesson-for-category', title: 'Lesson for Category', description: 'Creates a lesson for selected category', schemaType: 'lesson', parameters: [ { name: 'categoryId', type: 'string' } ], value: parameters => ({ category: {_type: 'reference', _ref: parameters.categoryId} //if i put here the categoryID manually for testing, the templating works (of course only manually for one specific category). So it has to be the parameter-passing from deskStructure to template. }) }) ]