Plugin that adds an option to re-order collection documents with drag n drop
Installation
npm i monorepo18
Stars
0
Forks
0
Open Issues
2 years ago
Last Updated
0
Weekly Downloads
v
npm Version
Dependencies
Trends appear after 7 days of data. Daily snapshots have not started yet.
Trends appear after 7 days of data. Daily snapshots have not started yet.
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/759677117-root)<a href="https://payloaddirectory.dev/plugins/759677117-root"><img src="https://payloaddirectory.dev/badge/759677117-root.svg" alt="Payload Directory"></a>README
# Note! This repository for 3.0 is deprecated and has been moved to https://github.com/r1tsuu/payload-enchants in order to keep all of my payload-related packages in 1 place. [2.0 branch](https://github.com/r1tsuu/payload-plugin-collections-docs-order/tree/2.0) # Payload Plugin Collections Docs Order for Payload 3.0 ## About Adds an option to re-order collection documents with drag n drop (almost like array/blocks items).
# Note! This repository for 3.0 is deprecated and has been moved to https://github.com/r1tsuu/payload-enchants in order to keep all of my payload-related packages in 1 place. [2.0 branch](https://github.com/r1tsuu/payload-plugin-collections-docs-order/tree/2.0) # Payload Plugin Collections Docs Order for Payload 3.0 ## About Adds an option to re-order collection documents with drag n drop (almost like array/blocks items). Then on your front end you can query documents with applied sort by `docOrder` field. ## Video https://github.com/r1tsuu/payload-plugin-collections-docs-order/assets/64744993/2c13cdd9-f809-4c40-82c6-0b6f78997f74 ## Install `pnpm add @r1tsu/[email protected]` In your payload.config.ts: ```ts /// .... import { collectionsDocsOrderPlugin } from '@r1tsu/payload-plugin-collections-docs-order'; export default buildConfig({ // ... plugins: [ collectionsDocsOrderPlugin({ collections: [{ slug: 'pages' }], // The feature will be enabled only for collections that are in this array., access: ({ req, data }) => { // Optional, configure access for `saveChanges` endpoint, default: Boolean(req.user) return req.user?.collection === 'admins'; }, }), ], }); ``` ## Querying with applied plugin's sort. REST: ```ts fetch('http://localhost:3000/api/examples?sort=docOrder').then((res) => res.json()); ``` Local API: ```ts payload.find({ collection: 'examples', sort: 'docOrder' }); ``` GraphQL: ```graphql query { Examples(sort: "docOrder") { docs { title } } ``` ## Script to setup for collections that had documents before installing the plugin 1. Create folder named cli in your project's root 2. Copy this file to the created folder and update `collections` array with your needs. https://gist.github.com/r1tsuu/047008be9800dfcbe371247d10ee6794 3. Run the file like that: `yarn ts-node --project ./tsconfig.server.json ./cli/pluginCollectionsDocsSetup.ts` (It will run for a database that in your .env, also be sure to backup if this on production)
payload theme
shadcn-style redesign of the Payload admin panel driven by one accent color, with dashboard, command palette and dark…
69909/wk26v3
theme management
Theme presets, live preview and WCAG contrast audit managed from the Payload admin, with SSR theme injection for Next.js
650/wk9v3
payload nav studio
Replace the Payload admin sidebar with a drag-and-drop navigation that each user can customize
640/wk13v3
blockwright
Visual drag-and-drop page and theme builder for Payload with widgets, forms, menus and templates
610/wk3v3
payload plugin
Payload plugin adding layouts, templates, menus, forms and a visual editor for the Blockwright page builder
600/wk3v3
payload plugin presets
Save and apply reusable block configurations as presets in the Payload admin panel
580/wk29v3