I have two collections, blog, and news.
Blogposts have the path: example.com/blog/blogpost1
, example.com/blog/blogpost2
, etc.
News have the path: example.com/news/newsa
, example.com/news/newsb
I want to have all the news to start from a relative URL of /news/
.
I added this:
- { label: 'Path', name: 'path', default: '/news/' }
Which makes it a default. So in the admin panel, when creating a new post or news, the beginning of the path will be already populated as /blog/
or /news/
Other users will add posts and news. I want to avoid/prevent people to remove this default path. Unfortunately in post/news editing mode they can delete this path on purpose or by mistake.
How can I make the default path undeletable, so that editors can only add characters after /news/ but not delete the /news/ part?
I tried to add widget: 'hidden'
however this makes the whole field disappear, not only the pre-populated /news/
slug