@@ -160,6 +160,7 @@ export function ContentTypeEditor({
160160 const [ labelSingular , setLabelSingular ] = React . useState ( collection ?. labelSingular ?? "" ) ;
161161 const [ description , setDescription ] = React . useState ( collection ?. description ?? "" ) ;
162162 const [ urlPattern , setUrlPattern ] = React . useState ( collection ?. urlPattern ?? "" ) ;
163+ const [ routable , setRoutable ] = React . useState ( collection ?. routable ?? true ) ;
163164 // SEO is managed via the separate `hasSeo` field; strip any legacy "seo" entry
164165 // so it isn't sent back on save (the API enum rejects it).
165166 const [ supports , setSupports ] = React . useState < string [ ] > (
@@ -200,6 +201,7 @@ export function ContentTypeEditor({
200201 labelSingular !== ( collection . labelSingular ?? "" ) ||
201202 description !== ( collection . description ?? "" ) ||
202203 urlPattern !== ( collection . urlPattern ?? "" ) ||
204+ routable !== ( collection . routable ?? true ) ||
203205 JSON . stringify ( [ ...supports ] . toSorted ( ) ) !==
204206 JSON . stringify ( collection . supports . filter ( ( s ) => s !== "seo" ) . toSorted ( ) ) ||
205207 hasSeo !== collection . hasSeo ||
@@ -216,6 +218,7 @@ export function ContentTypeEditor({
216218 labelSingular ,
217219 description ,
218220 urlPattern ,
221+ routable ,
219222 supports ,
220223 hasSeo ,
221224 commentsEnabled ,
@@ -261,6 +264,7 @@ export function ContentTypeEditor({
261264 labelSingular : labelSingular || undefined ,
262265 description : description || undefined ,
263266 urlPattern : urlPattern || undefined ,
267+ routable,
264268 supports,
265269 hasSeo,
266270 } ) ;
@@ -270,6 +274,7 @@ export function ContentTypeEditor({
270274 labelSingular : labelSingular || undefined ,
271275 description : description || undefined ,
272276 urlPattern : urlPattern || undefined ,
277+ routable,
273278 supports,
274279 hasSeo,
275280 commentsEnabled,
@@ -325,10 +330,6 @@ export function ContentTypeEditor({
325330
326331 return (
327332 < div className = "space-y-6" >
328- { /* Sticky header keeps the primary save action in view while users
329- scroll through the settings + fields panels. The bottom-of-form
330- save button is preserved below for keyboard / screen-reader users
331- so DOM order still ends with a submit control. */ }
332333 < EditorHeader
333334 leading = {
334335 < RouterLinkButton
@@ -418,6 +419,20 @@ export function ContentTypeEditor({
418419 disabled = { isFromCode }
419420 />
420421
422+ < Switch
423+ checked = { routable }
424+ onCheckedChange = { setRoutable }
425+ disabled = { isFromCode }
426+ label = {
427+ < div >
428+ < span className = "text-sm font-medium" > { t `Routable` } </ span >
429+ < p className = "text-xs text-kumo-subtle" >
430+ { t `Require a slug before content can be published` }
431+ </ p >
432+ </ div >
433+ }
434+ />
435+
421436 < div >
422437 < Input
423438 label = { t `URL Pattern` }
0 commit comments