content-type - Strapi 隐藏内容类型
问题描述
我已经搜索了几个小时如何隐藏特定的内容类型。
我找到了一些帖子,但它们太旧了,而且它们的解决方案在实际的 strpi 中不起作用。
为了精确起见,我的集合类型是在本地插件中声明的。我只是想在插件页面中管理我的收藏,我不希望它出现在左侧菜单的内容类型中。
如果有人有解决方案,那真的很有帮助。
解决方案
在新版本的 Strapi v3.6.6 — 社区版中,模型中有一个选项
{
"kind": "collectionType",
"collectionName": "test",
"info": {
"name": "test"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
**"pluginOptions": {
"content-manager": {
"visible": false
}
},**
"attributes": {
"name": {
"type": "string",
"required": true
},
}
}
推荐阅读
- ios - 如何从不继承 UIviewController 的类(从带有 class 的 swift 文件)加载 UIViewController?
- postgresql - POSTGRES 续集任何运算符查询
- c# - RestRequest 在 Postman 中工作,但在 C# 中给出 403 Forbidden 错误
- linux - 在静默模式下安装 Oracle 后,我无法运行 SQLPLUS
- html - 如何阻止 IE 和 Edge 上的文本溢出 div
- swiftui - SwiftUI - 用不同的动作响应点击和双击
- ios - 从 'Double' 转换为不相关类型 'String' 总是失败
- php - 从容器中获取 docker 网络的私有 ip 以配置 xdebug remote_host
- c - 如何检查 C tiny c 编译器中是否存在文件
- vue.js - 有没有办法用 vue 的 @click 写一个快速函数?