From 26c6724d7f3d7974491796195f38955d817ba079 Mon Sep 17 00:00:00 2001 From: Laura Gerhardt Date: Thu, 19 Mar 2020 11:27:54 -0400 Subject: [PATCH] restrict categories to existing --- admin/_config.yml | 1 + admin/_content_collection_template.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/_config.yml b/admin/_config.yml index 74059b04f..a20f8b1b6 100644 --- a/admin/_config.yml +++ b/admin/_config.yml @@ -13,6 +13,7 @@ backend: branch: dev #this will need to be changed once we deploy use_graphql: true +local_backend: true media_folder: assets/uploads public_folder: /images/uploads diff --git a/admin/_content_collection_template.yml b/admin/_content_collection_template.yml index 1e89425ec..841b95753 100644 --- a/admin/_content_collection_template.yml +++ b/admin/_content_collection_template.yml @@ -10,7 +10,7 @@ slug: '{{slug}}' fields: - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'post'} - {label: 'Title', name: 'title', widget: 'string'} - - {label: 'Category', name: 'category', widget: 'string'} + - {label: 'Category - from existing', name: 'category', widget: 'relation', collection: 'categories', searchFields: ['title', 'name'], valueField: 'name'} - {label: 'Source name', name: 'source', widget: 'string'} - {label: 'Source link', name: 'source_url', widget: 'string'} - {label: 'Promoted', name: 'promoted', widget: 'boolean', default: false}