首页 > 解决方案 > Strapi 隐藏内容类型

问题描述

我已经搜索了几个小时如何隐藏特定的内容类型。

我找到了一些帖子,但它们太旧了,而且它们的解决方案在实际的 strpi 中不起作用。

为了精确起见,我的集合类型是在本地插件中声明的。我只是想在插件页面中管理我的收藏,我不希望它出现在左侧菜单的内容类型中。

如果有人有解决方案,那真的很有帮助。

标签: content-typestrapi

解决方案


在新版本的 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
    },
    
  }

}

推荐阅读