diff --git a/cms/src/api/article/content-types/article/schema.json b/cms/src/api/article/content-types/article/schema.json index ce70310d51..e4f33166e0 100644 --- a/cms/src/api/article/content-types/article/schema.json +++ b/cms/src/api/article/content-types/article/schema.json @@ -16,12 +16,6 @@ "type": "string", "required": true }, - "slug": { - "type": "string", - "required": true, - "unique": true, - "regex": "^([a-zA-Z-]*)$" - }, "description": { "type": "text", "required": true @@ -45,6 +39,10 @@ "relation": "manyToOne", "target": "api::categorie.categorie", "inversedBy": "articles" + }, + "slug": { + "type": "uid", + "targetField": "title" } } } diff --git a/cms/src/api/categorie/content-types/categorie/schema.json b/cms/src/api/categorie/content-types/categorie/schema.json index 42ba3d1306..9c9966e834 100644 --- a/cms/src/api/categorie/content-types/categorie/schema.json +++ b/cms/src/api/categorie/content-types/categorie/schema.json @@ -16,16 +16,15 @@ "type": "string", "required": true }, - "slug": { - "type": "string", - "required": true, - "regex": "^([a-zA-Z-]*)$" - }, "articles": { "type": "relation", "relation": "oneToMany", "target": "api::article.article", "mappedBy": "categorie" + }, + "slug": { + "type": "uid", + "targetField": "label" } } } diff --git a/cms/src/api/page/content-types/page/schema.json b/cms/src/api/page/content-types/page/schema.json index ec094360e3..df63dda3f2 100644 --- a/cms/src/api/page/content-types/page/schema.json +++ b/cms/src/api/page/content-types/page/schema.json @@ -16,29 +16,49 @@ "type": "string", "required": true }, - "sections": { + "tags": { + "type": "relation", + "relation": "manyToMany", + "target": "api::tag.tag", + "inversedBy": "pages" + }, + "hero": { + "type": "component", + "repeatable": false, + "component": "page.hero" + }, + "block": { + "type": "component", + "repeatable": false, + "component": "page.block" + }, + "content": { + "type": "richtext", + "required": false + }, + "rows": { "type": "dynamiczone", "components": [ - "page.hero", - "page.block", - "shared.button", - "page.content", - "page.row", - "page.list", - "page.resource" + "row.analyse", + "row.graph", + "row.indicator", + "row.map" ] }, - "slug": { - "type": "string", - "regex": "^([a-zA-Z-]*)$", - "unique": true, - "required": true - }, - "tags": { + "resources": { "type": "relation", "relation": "manyToMany", - "target": "api::tag.tag", + "target": "api::resource.resource", "inversedBy": "pages" + }, + "list": { + "type": "component", + "repeatable": false, + "component": "page.list" + }, + "slug": { + "type": "uid", + "targetField": "title" } } } diff --git a/cms/src/api/resource/content-types/resource/schema.json b/cms/src/api/resource/content-types/resource/schema.json index cae472fce9..31f081067f 100644 --- a/cms/src/api/resource/content-types/resource/schema.json +++ b/cms/src/api/resource/content-types/resource/schema.json @@ -16,12 +16,6 @@ "type": "string", "required": true }, - "slug": { - "type": "string", - "required": true, - "unique": true, - "regex": "^([a-zA-Z-]*)$" - }, "content": { "type": "richtext", "required": true @@ -29,6 +23,16 @@ "public_date": { "type": "date", "required": true + }, + "pages": { + "type": "relation", + "relation": "manyToMany", + "target": "api::page.page", + "mappedBy": "resources" + }, + "slug": { + "type": "uid", + "targetField": "title" } } } diff --git a/cms/src/api/tag/content-types/tag/schema.json b/cms/src/api/tag/content-types/tag/schema.json index 80b4898587..511465629d 100644 --- a/cms/src/api/tag/content-types/tag/schema.json +++ b/cms/src/api/tag/content-types/tag/schema.json @@ -4,7 +4,8 @@ "info": { "singularName": "tag", "pluralName": "tags", - "displayName": "Tag" + "displayName": "Tag", + "description": "" }, "options": { "draftAndPublish": false @@ -16,17 +17,15 @@ "unique": false, "required": true }, - "slug": { - "type": "string", - "regex": "^([a-zA-Z-]*)$", - "unique": true, - "required": true - }, "pages": { "type": "relation", "relation": "manyToMany", "target": "api::page.page", "mappedBy": "tags" + }, + "slug": { + "type": "uid", + "targetField": "label" } } } diff --git a/cms/src/components/page/content.json b/cms/src/components/page/content.json deleted file mode 100644 index c0612860a9..0000000000 --- a/cms/src/components/page/content.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "collectionName": "components_page_contents", - "info": { - "displayName": "content" - }, - "options": {}, - "attributes": { - "content": { - "type": "richtext" - } - } -} diff --git a/cms/src/components/page/resource.json b/cms/src/components/page/resource.json deleted file mode 100644 index 10a5332ede..0000000000 --- a/cms/src/components/page/resource.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "collectionName": "components_page_resources", - "info": { - "displayName": "resource" - }, - "options": {}, - "attributes": { - "resource": { - "type": "relation", - "relation": "oneToOne", - "target": "api::resource.resource" - } - } -} diff --git a/cms/src/components/page/row.json b/cms/src/components/page/row.json deleted file mode 100644 index b126bacde9..0000000000 --- a/cms/src/components/page/row.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "collectionName": "components_page_rows", - "info": { - "displayName": "row", - "description": "" - }, - "options": {}, - "attributes": { - "row": { - "type": "relation", - "relation": "oneToOne", - "target": "api::row.row" - } - } -}