Draggable views in Drupal 8

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in this video we're going to be taking a look at druggable views we're going to download and install the druggable views module we're going to create a admin page for editing the order we're going to set the trigger and the sorting and we're going to create a front page that implements the sorting so the draggable views basically enables us to create a admin page with drag-and-drop where we could actually control the order of let's see articles and we could then implement the same order at the front end here we have a Drupal instance installed and we have the druggable views module and we're going to copy this bit and jump to our terminal for the Drupal instance that we just saw and we're going to change to the folder with the composer JSON and we're going to simply do a composer require Drupal drag above use perfect so we downloaded the draggable views module so let's jump back to the Drupal instance and under extent let's go ahead and install the draggable views module so we have the jungle views module installed let's go ahead and create a admin page we're going to create a new tab here and we're going to maybe let's list just articles there because we have a content type article so let's create a new view by going under structure views and add a new view and we're going to say our Tico's order and we're going to show content of type article and we're going to create a page articles order and the path would start with admin content and then articles order so that's good enough we're going to not use a pager because if we have more than 10 we would not be able to control the order there so we save and edit and as we see here under preview we are already seeing the articles but we actually want them as table that's much better and we're going to hit apply and the next thing we want to do is would like to actually add the druggable views content there is content from the category draggable views so we're adding that and it is important to have it after the title like this and we're going to also add its at operations so that would have some edit and whatnot operations in the table so if we now actually save let's see if that looks okay so this should be like this and if we actually save we're actually able to see here that the triggers are already there but we're not quite finished here because we'd have to remove this sorting criteria ordered on so I'm going to just remove it and we're going to add the draggable views wait that's perfect and it's going to be ascending let's try with that so I'm going to save here and let's lastly just check the menu and add a menu tab and say our tico order and we hit apply and we save and let's open the content overview page in a new tab and we're seeing here our new tab that we just created it's article order and let's go ahead and test it a bit so we have the test note entry at the top here if we move it at the bottom and we save the order it actually stays like that so we have it correctly setup and the next thing we want to do is would like to actually have a front page like this one but would have just the front page with articles so let's go ahead and create a new view from structure views and create a new view and let's call it article overview top articles let's see like the hottest article that we want to promote in our system and we're going to create a page and we are showing content of type article and we are not using the pager again and we're saying save and edit and here we have the articles but what we want to do is we would like to actually implement again the sorting of the druggable views and as we say draggable views weight sorting and as we have the same sorting as and the admin page we hit apply and as we save it if we now go to the top articles page we would see that the test article is at the top and the test note entry is at the bottom and if we now actually go to the content page and article order if we now put the test note entry at the top and that last second and if we say the order and if we refresh this page we would see that the test note entry is at the top and the tatis is second which is exactly the order that we saved in the back end so if you like this video please check the links in the description ask if you have any questions on this topic share subscribe if you like this video hit the thumbs up and thanks for watching
Info
Channel: Drupal Up - Drupal 8 Video Tutorials
Views: 4,717
Rating: 4.8987341 out of 5
Keywords: drupal, drupal8, drupal tutorial, drupal 8 tutorial learn drupal, views, draggable views
Id: F_Hy0NrGAo0
Channel Id: undefined
Length: 7min 58sec (478 seconds)
Published: Tue May 21 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.