Bookable Entities Everywhere | Drupal.org

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there this is Adrian from ramify and today I'm going to tell you about a new module we've been developing to make it easier to create booking experiences in Drupal 8 and so it's called bookable entities everywhere or B for short and the short version is that it think you can make any node type book able so today I'm just going to show you a really quick demo on simply test op me which is an awesome service if you don't know about it so we're going to go to this link and just go ahead and launch our sandbox and I'll be back in a second okay we're back simply desktop me has built the site and dispatch to B and the dependencies including the bat module now we're going to log in and try it out so first we need to enable the module just go ahead and filter down to booking and enable bookable entities everywhere so several dependencies just go ahead and continue and then our next step is going to be to create a content type and for this example we're just going to say that we're a small organization that has a couple of meeting rooms and so you don't need to take payment or anything like that but everyone just wants to be able to see when the rooms are available and who's going to use them so we're going to go ahead and create a content type and call it meeting room and we'll go defaults and then under B we're going to say make this type book Abel and we're going to choose hourly bookings because it's a smaller granularity so we'll go ahead and save the content type and then add a couple of meeting rooms so we're going to add a meeting room and since I live in Colorado we're going to go with a mountain theme and we'll add that and go ahead and add another one and so you'll notice when you have and content type enabled for B there are a couple of things you can do you can by default you're going to see a view of the availability and you're going to have a button to add a reservation and there's some more options that we'll get into another time including office hours so we're going to go ahead and add a reservation for tomorrow I'm going to have the room for a couple hours in the morning at that and we'll add one for a couple days from now for the Pikes Peak Room and then we can look at creating a view to show those meetings coming up patience and now let's go look at creating a view so let's go ahead and create a view of upcoming meetings let's say add view coming meetings for the name what we're going to do is show events and that's an entity type that's provided by that show all types we can narrow it down if you are going to have multiple content types enabled for be for now we'll just leave it to all we're going to create a block we're going to show fields and a list is just fun so the first thing we want to do after we get rid of the operations links since this is a front-end view is to show the event dates and so we'll just choose event dates here and configure and you can choose your kind of your favorite a time format and probably a custom format would be the nicest to be a bit more compact but we'll just say beating time for the label then we're going to want to show a couple of other pieces of information we'd like to be able to show the room so to do that we're going to have to add a couple of relationships and so the first one is to the unit and that's another bat concept it's another type of entity and that basically just refers to the thing that's flickable and so a unit is created for each node and you can also create multiple units per node for items that might have many of the given type so we'll add that relationship and we also want a relationship to the content which is the node that we've added the meeting room so if we add that then we can go ahead and add the room so we'll look for the content title and select that and give it a label see that the relationship is selected appropriately if we go down now you can see that there's the title of the room and the meeting times and then let's just go ahead and show the username of the person that made the booking so we're going to need one more relationship and that is to the user what we want is the author of the event which is the booking so we'll add that relationship save it in add a field and search for the username add that and again selected the appropriate relationship we'll create a label and just call it owner and apply this so now we've got our information let's go ahead and save the view and we'll add it to the site good block layout and go ahead and put this in sidebar and the defaults will be fine move it to the top take the blocks now let's go look at the site and here we are and so that's just a quick introduction and overview of be the overriding concept is to try and integrate really tightly with Drupal standard site building tools so views and once it's ready for primetime in Drupal 8 then rules and the number of other modules so I hope this is useful to long people
Info
Channel: Roomify
Views: 8,461
Rating: 5 out of 5
Keywords: booking, drupal, drupal8, availability, site-building
Id: rhSqDvgfrCU
Channel Id: undefined
Length: 7min 58sec (478 seconds)
Published: Fri Mar 02 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.