1.7.1 • Published 10 months ago

@retikolo/drag-drop-content-types v1.7.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

dragdropcrop

⏳ Installation

Install with NPM.

npm i @retikolo/drag-drop-content-types

Install with Yarn.

yarn add @retikolo/drag-drop-content-types

🔧 Configuration

In your config

  1. Add the following to your config/plugins.js file. Create the file, if it doesn't exist.
module.exports = {
  // ...
  'drag-drop-content-types': {
    enabled: true
  }
}
  1. Run npm run build and restart the app using npm run develop.

In the app

  1. Go to SettingsDrag Drop Content TypeConfiguration.
  2. Specify the Rank Field Name used for sorting or leave the default field name rank.
  3. Add a Number field with Name: myRankFieldName and Number format: integer to the sortable ContentType.
  4. Configure the view of your ContentType by adding Default sort attribute → rank and Default sort order → ASC to update the view after dragging.
  5. If needed: grant permissions for the rank field to your roles.

Hints

  • You can set a title value that will be displayed in the menu instead of the default field.
  • A second field can be displayed in the menu via the subtitle setting. It can be either a string-like field or an object such as a relation, that has a title field as configured in the settings.
  • You can enable webhooks to trigger something after updating the order.

In your frontend

You can make a request in the frontend to get the ordered items. In this example the ContentType is called Foo and ordered via the rank field.

http://localhost:1337/api/foo?sort=rank:asc

🤝 Contribute

Feel free to fork and make pull requests to this plugin. All input is welcome - thanks for all contributions so far!

⭐️ Support

I you like this project, please give it a star ⭐️. Maybe this will help it getting integrated to strapi's core some day 😊.

1.7.1

10 months ago

1.7.0

10 months ago

1.5.4

1 year ago

1.5.3

1 year ago

1.6.0

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.10

2 years ago

1.3.11

2 years ago

1.3.9

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.2.1

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago