I use Drupal 8, but I can not figure out how to sort views with drag and drop. The client needs to sort the items of the views in a very personal way.
Do you know some way?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThe Draggable Views module might be what you need. There is a version of the module for Drupal 8.
According to the module description,
DraggableViews makes rows of a view "draggable" which means that they can be rearranged by Drag'n'Drop.
I tried the following instructions in the documentation page on a vanilla Drupal 8.2.6 installation, and it worked fine (see screenshot below).
- Activate the module and navigate to the edit-page of an existing view.
- Now go to the Format section and choose Table.
- Make sure you have the "Content: Title" field, place it as your first field.
- Add the field "Draggableviews: Content" at the Fields section, place it after the "Content: Title" field.Make sure not to check "Exclude from display"; if you do the view will permit drag and drop but the changes will not be saved.
- Add "DraggableViews: Weight" at the Sort criteria section and place it as the first Sort criteria. Save the view and you're done.
Have you tried Entityqueue? It is a drag and drop interface, in which you insert nodes and sort them.
You can then use the nodequeue as a relation, and sort criteria in views...
You will need to create two set of views (lets say list view and order view) and they both should be sorted by draggableviews:weight. The order list view should be displayed as a table and should have draggableviews:content as one of its fields. See attached example.
Once this is setup, you can go back to list view and click on draggableviews:weight and select the newly created order view as sort order.
Let me know how you go.
Refer this link, it may help. https://www.drupal.org/node/2824325