Skip to content

A plugin for Payload CMS that adds a collapsible Tree list view.

License

Notifications You must be signed in to change notification settings

elcodo/payload-plugin-tree-list

 
 

Repository files navigation

Payload Tree List Plugin

A plugin for Payload CMS that adds a collapsible Tree list view. This plugin depends on the Payload Nested Docs Plugin for its parent implementation.

This plugin is compatible only with Payload CMS version 3.x.

Payload Tree List Plugin Example with some items open and other closed

Installation / How to use

Minimum required payload version: 3.x

Install the plugin using yarn add @payloadcms/plugin-nested-docs payload-plugin-tree-list. Then, add the plugin to your Payload configuration file:

payload.config.ts:

import { buildConfig } from "payload";
import { nestedDocsPlugin } from "@payloadcms/plugin-nested-docs";
import { treeListPlugin } from "payload-plugin-tree-list";


export default buildConfig({
  ...
  plugins: [
    nestedDocsPlugin({ collections: ["posts"] }),
    treeListPlugin({ collections: ["posts"] }),
  ],
  ...
});

Testing locally

This project use pnpm workspaces. Install all dependencies from root and build the plugin

pnpm i
pnpm build

To start the postgres database and the development server, run the following commands:

cd dev
cp .env.example .env
sh scripts/database-init.sh
pnpm dev

Access http://localhost:3000/admin

The plugin is configured for pages collection

About

A plugin for Payload CMS that adds a collapsible Tree list view.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.0%
  • JavaScript 4.0%
  • SCSS 1.2%
  • Other 0.8%