strapi-plugin-content-manager-folder
v0.1.1
Published
Build a folder-based Content Manager navigation without modifying Strapi core.
Downloads
298
Readme
Content Manager Folder
Create a folder-based navigation tree for Strapi Content Manager collection types and single types without modifying Strapi core.
The plugin is an Admin UI enhancement. It stores a custom menu tree in the Strapi plugin store, then replaces the native Content Manager sidebar at runtime when the feature is enabled.
Features
- Adds a standalone admin page:
Content Manager Folder - Supports folder nodes and menu item nodes
- Binds menu items to Collection Types or Single Types
- Supports nested folders
- Supports drag sorting between sibling nodes
- Exports and imports folder settings as JSON
- Supports folder collapse state
- Stores settings in the Strapi plugin store
- Keeps Strapi's original permissions behavior by reusing existing Content Manager links
- Does not change schemas, content types, database tables, or Strapi core files
Compatibility
- Strapi v5
- React 17 or 18
- React Router v6
- Styled Components v6
See package.json peer dependencies for the exact supported ranges.
Installation
Local Plugin
Place the plugin in your Strapi project:
src/plugins/content-manager-folderEnable it in config/plugins.ts:
import type { Core } from '@strapi/strapi';
const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Plugin => ({
'content-manager-folder': {
enabled: true,
resolve: './src/plugins/content-manager-folder',
},
});
export default config;Rebuild the admin panel and restart Strapi:
npm run build
npm run developPackage Install
When the plugin is published as a package, install it from npm:
npm install strapi-plugin-content-manager-folderThen enable it in config/plugins.ts:
export default () => ({
'content-manager-folder': {
enabled: true,
},
});Rebuild the admin panel after installing or upgrading the plugin:
npm run buildAdmin Permissions
The plugin registers these admin permission actions:
plugin::content-manager-folder.settings.readplugin::content-manager-folder.settings.updateplugin::content-manager-folder.content-types.read
If a non-super-admin role cannot open or save the plugin page, grant these permissions in the Strapi admin role settings.
Usage
- Open the Strapi admin panel.
- Open
Content Manager Folderfrom the left admin menu. - Click
Add menu +to add a root menu node. - Check
Folderif the node should be a folder. - For menu items, choose:
CollectionorSingle- The target content type UID
- Use the plus button on a folder row to add child nodes.
- Use the drag handle to reorder sibling nodes.
- Use
Exportto download the current settings as JSON when you need a backup or migration file. - Use
Importto load a JSON settings file into the editor. Imported settings are not persisted until you clickSave. - Enable
Enable folder navigation. - Click
Save. - Open Content Manager. The native Collection Types and Single Types navigation will be replaced by the configured folder tree.
How It Works
The plugin does not create a new router for Content Manager pages. Instead, it reads the native Content Manager links already rendered by Strapi, matches them by type and UID, and moves those links into your configured folder tree.
This means:
- Strapi's own access control still decides which links exist.
- A menu item is rendered only if the current admin user can see the original Content Manager link.
- Invalid or missing UIDs are skipped instead of creating broken links.
- Disabling the plugin restores the native Content Manager navigation.
Settings Storage
Settings are stored in the Strapi plugin store:
strapi.store({ type: 'plugin', name: 'content-manager-folder' })The current settings key is:
settingsData Shape
{
"enabled": true,
"menus": [
{
"id": "folder-products",
"title": "Product Management",
"sort": 40,
"isFolder": true,
"collapsed": false,
"children": [
{
"id": "item-products",
"title": "Product List",
"sort": 10,
"isFolder": false,
"type": "collectionType",
"uid": "api::product.product",
"children": []
},
{
"id": "item-product-page",
"title": "Product Page",
"sort": 20,
"isFolder": false,
"type": "singleType",
"uid": "api::collections-page.collections-page",
"children": []
}
]
}
]
}Menu Node Fields
| Field | Type | Description |
| --- | --- | --- |
| id | string | Stable node ID. Used for editing and collapse state. |
| title | string | Label displayed in the Content Manager navigation. |
| sort | number | Sort order among sibling nodes. |
| isFolder | boolean | true for folder nodes, false for menu items. |
| collapsed | boolean | Default collapsed state for folder nodes. |
| type | string | collectionType or singleType. Only used by menu items. |
| uid | string | Strapi content type UID. Only used by menu items. |
| children | array | Child nodes. Only rendered for folder nodes. |
API Endpoints
All routes require an authenticated Strapi admin user.
| Method | Path | Description |
| --- | --- | --- |
| GET | /content-manager-folder/settings | Read plugin settings. |
| PUT | /content-manager-folder/settings | Save plugin settings. |
| GET | /content-manager-folder/content-types | Read available Collection Types and Single Types. |
Default Settings
If no settings have been saved yet, the server returns defaultSettings from server/index.js.
For a marketplace-ready plugin, keep defaults generic, for example:
const defaultSettings = {
enabled: false,
menus: [],
};For a project-specific plugin, you may keep a prebuilt defaultMenus tree so the first install has a ready-to-use menu structure.
Notes and Limitations
- This is a DOM-level Admin UI enhancement. It should be retested after major Strapi admin UI upgrades.
- Only one Content Manager navigation replacement should be active at a time.
- Menu items depend on existing Strapi Content Manager links, so hidden or unauthorized content types will not appear.
- Folder collapse state is stored in browser
localStorage. - The plugin does not modify content type display names. The configured menu title only changes the sidebar label rendered by this plugin.
Development
After changing admin code, rebuild the Strapi admin panel:
npm run buildFor local development:
npm run develop