 have prepared development environments for you to follow along while I'm doing the presentation. So the idea is that by the time that we're done, you have a work in Drupal site that you can continue working with, you know, after the conference. Another thing that I want to point out is that this is two session slots joined together. So we are actually here for about one hour and 45 minutes. So the plan is to divide the workshop in three sections. Each section is going to be about 30 minutes long and then five minutes of break in between. So feel free to, you know, look for water now or later. But be mindful that this is a long session in relation to other slots at Drupal come. Yeah, we will be starting shortly. Amy June, who is in the back, she's raising her hand. She will be helping with the training. So if you are stuck at any point, raise your hand and she will come to you. And also during the training, I will be making some pauses to, you know, opening up for questions. So feel free to ask anything that you want to know about Drupal. For, I don't think that workshops are being recorded, but just for good practice, when someone asks questions, I will repeat it so everybody can hear the question and also to make sure that I understood it properly. And then I will answer it. How are you? If you feel comfortable, hello. Nice to see you. Likewise. I have a slide for, like with your information, the one with you don't function. I don't know if you want to introduce yourself. No, you can't. That's fine. That's fine. I am heard of hearing. Okay. So that's the only thing that you, with the microphone, it's okay. Okay. Yeah, just let me know, and I'll kind of, I don't know whether or not to sit in the front or sit in the back. Maybe sit in the front and watch people that way. I can see if they have, like, a look of layers over their eyes. When are you going to start? Now, okay. I'm going to go move my stuff and get a drink of water real quick. Yeah, sure. Okay. The first part is just, like, some intro and some instruction, so I can, do you want me to wait for you? No, no, no, no, no, no. It's the same training we get all the time, right? Yeah. It's a different example, but basically the same idea. Okay. Okay. It's time. Thank you, everybody, for being here. This is getting started with Drupal. Drupal Compact 2022. Amy Joon, as I introduced before and myself, Mauricio Dinarte, are going to be facilitating the training. Amy Joon, she goes by Wolves Vaganshik in Drupal.org and on Twitter. Her pronouns are she and her. She is a senior community manager for open source.com at Redhack. She's a Drupal core mentor and among other things, she enjoys geo-coaching, traveling to punk rock shows, and mushroom spotting. And she's somewhat humble in that she's also an Aaron Wimburn award winner, so that's a very prestigious community awarded, a very prestigious award that is granted by the Drupal community, and she's one of them. I am Mauricio Dinarte. I go by Dinarcon on Drupal.org, Twitter, pretty much everywhere online where I have a presence. That is my email, feel free to reach out to me. My pronouns are he and him. I am a software engineer at Agaric, and I'm also an instructor at UnderstandDrupal.com, and just like for you to know, this workshop is normally presented as a full day training, like six to eight hours. Today we are shrinking it like under two hours. So I'm going to try to not rush it, but it will not be possible to cover everything that I normally cover. So for that, I will be recording and making it available at UnderstandDrupal.com, the extended version of this workshop. So very likely next month, if you follow the website, you are going to see the full recording, like with all the examples and exercises. And other than spending time in front of a computer, I enjoy reading, traveling, and learning languages, both human and computer. But on the human side, I somehow can communicate with different degrees of success in English, Spanish, French, and Portuguese. So if you speak any of those languages, it will be nice to talk to you. Some quick announcement. As I mentioned before, Agaric.com, that's the organization that I work with. We are working on Cooperative, distributed around the world. We focus a lot on Drupal development, and for the last four or five years, we have been diving deep into upgrading Drupal sites from six and seven to eight, nine, and very soon Drupal 10. So if you happen to have a site that needs to be upgraded, feel free to reach out. Speaking of upgrades, I have written courses on migrations in general. And I am developing a course on upgrading from six and seven to nine and ten. So that is also becoming to UnderstandDrupal.com. And even though the website at the moment is mostly in English, the goal is to have it available also in Spanish and French. Because I myself, I am not a native English speaker. And I was fortunate enough to know English, but not everybody does. So I want to help break the language barrier. And this is one way in which I would like to contribute to the Drupal community in terms of documentation in other languages. And I will also want to give a huge shout out to Pantheon, because they are making it possible for me to be here today. They are offering support for travels and accommodation. So very, very thankful to them. As I said before, this is going to be a workshop that is basically all the slides that I have and everything else we want to make good use of the time to actually build something together. And by the end of the workshop, you have something that you can show to your friends. That is the link that you should follow right now. And you're going to be taking to Google Docs with more instructions. So while you type the URL, in general, what we're going to do is learn how to install Drupal, how to create content, and different properties of content in Drupal. We are going to learn how to create custom content types and add fields. We're going to work with views and more Drupal concepts. I know that if this is the first time that you're interacting with Drupal, the names of these concepts might not make sense at the very beginning. But we're going to explain them along that way. And as I said before, feel free to ask any questions. So I'm going to get out of the presentation. And this is the document that you should be in. As I said before, the recording will be later available on understanddrupal.com. This link to the document that we're seeing is this one. And this is probably the most important for you at this moment. What it says, follow, and claim, and function development environment. So write your name and claim one of those environments. That is the site that you're going to be working with today, while we work on the site together. So you can, you know, an alias, or a nickname, or your Drupal.org username. Just claim one, and you can follow along using that. So I'm going to give you a couple of minutes to do that. If you don't want to use that site, you are free to use any local environment that you might have already installed on your computer. I personally use it like DDEV. But another option is also simply TestMe, which is another service provided by the Drupal community, which allows you to test not only Drupal core, but also modules and themes and distribution. This is very powerful. So again, this is noted in the document, but it's yet another alternative. But the benefit of using the function development environment is that they are going to persist for longer than simply TestMe. Usually, simply TestMe is around for about 24 hours. The function environment is going to be around for about a month. So if during the training or after the event, you want to keep, you know, playing around with it, you will be able to do it. And if you want to have a function environment that will never expire, you can create an account. And you have, I think, two free sites that you can, you know, they are fully working sites that you can use to practice. And so it's udrupal.com-prac-2022-workshop. udrupal.com-prac-2022-workshop. Does anyone need some more time to get set up? Are we ready? OK. So to give you an overview, this is the site that we're going to build together. We're going to have a customized homepage. We're going to recreate some of the functionality that udrupal gives you out of the box by having a new section on the site in which we can, you know, have this river of news like a newspaper. We are also going to create a custom content type for events. And we're going to expose information. We're going to learn how to set up this table to be dynamic so that if new content is added to the site, you don't have to do anything manual for that table to update itself. At the end of the workshop, this is going to be probably just like a demo, not expecting you to follow along because there are many steps. But at least I want to introduce the concept of something that is called exposed filters in views that allows you to give your end users even more customization options in terms of how they interact with your site. And we're also going to learn about navigation, menus, blogs, contact forms, and so on. But the most important part is understanding how content works in drupal and what you can do with it. So that being said, you should be, if you already claim your site, you should have an installation screen like this. Are we all on the same page? Yes? No? Maybe? OK. So out of the box, drupal is multilingual. The interface is already translated to many different languages. And these translations are actually community-provided. So if you know a different language other than English, you can contribute the translations of the interface to the project for the benefit of everyone. On top of that, it is very easy with the functionality that is provided out of the box to translate content into multiple languages. For simplicity sake, we're going to install in English today. So in the first prompt, we just leave the default and click Save and continue. Then we are asked about choosing an installation profile. As you are going to learn during your drupal journey, drupal is like LEGO blocks. There are tons of LEGO boxes in LEGO blocks in a set, but you can build different things. You can combine them as you wish to build different things with the LEGOs. So something similar happened with drupal. Drupal is a collection of those sets of modules, if not hundreds, and also things. But it would be impractical for every possible module in drupal that is available to be enabled out of the box, or every possible thing to be enabled out of the box. So what an installation profile is, is a decision that someone did. In this case, what we're seeing here is the core committers. They said that this is the set of modules that we want to enable by default. If you want to disable some of them, that's fine. If you want to enable more, that is also fine. But this is what we're going to ship by default. And you have three options, a standard, which is what we're going to be working on today. Minimal, which is, I think, only five modules, and that is the bare minimum that drupal needs to work. Without those modules, drupal will not work. And then we have umami. Umami is just a demonstration of what you can build with drupal. And you're going to see that it is very different from what you get from a standard. And just to show it around, I have another site already prepared with the umami installation profile. And just by selecting that, you are going to get this. We're going to select a standard, but I just want to give you an overview of what you get with umami. This is a site for a food magazine that already comes with demo content, demo recipes, images, and so on. The site is already multilingual. You can view it in Spanish and English. And among other features, it leverages something that is called Layout Builder. If you are new to drupal, this is something that is going to be very, very important in the near future. So remember this name Layout Builder. Depending on how much time we have at the end, I can do a demo of that. But basically it is a UI in which you can change the layout of the page without having to code anything. You just move things around and you can change the layout completely. So that is Layout Builder. And again, what we're seeing here is something completely different than what we're going to be working with today. And it's an example of having multiple, different modules enabled by default. And in this case, having some demo content pulled in already for you. So if you want to visit this site, the only thing that you need to do is change the number in your URL and type umami. And then you are going to land in the demo site. You will not be able to log in, but you will be able to see how the site looks. Going back to the installation screen, we're going to install using the standard installation profile, as I said before, save and continue. Now, drupal is going to make some checks to verify requirements. For example, do you have a supported version of PHP? Do you have the recommended and or required PHP libraries to go with it? Do you have a database that I can use to install myself and so on? Because we're using Pantheon and Pantheon is optimized to run with drupal. All those checks are all passed and then you can start working on the site right away. And this is something that might seem like silly or obvious, we just waited like 30 seconds and we skipped those steps. When I started with drupal over 10 years ago, I would spend between two hours and two weeks just to set up my computer and a local web server to be able to install drupal. Being able to do this in 30 seconds, it's fantastic. And again, this is not only Pantheon. Other hosting providers offer similar solutions. I just happened to be working with Pantheon for a long time, even before they were sponsoring me. And it's always useful because you don't have a time limit for the demo sites that you create and you can basically treat them as a real functional site. Okay, all that being said, we have one more page before we actually see the site fully installed. We can enter anything that we want in here. I'm just going to put some examples. Prag 2022, the email is going to be admin.example.com. My username is going to be admin for simplicity sake, but that is a really bad idea. You should have a different username and you should have a complex password, especially if you are using your site in production. This is just a test. I trust that you won't try to hack into my site at the moment, so let's work based on that. I'm going to write a not very secure password, which I'm not going to tell you, just in case. Then we are prompt for a second email address. One thing to note, why do I get two prompts for emails? The one at the top is the site email address. Anytime that your site needs to send an email, for example, if you forget your password, you are going to request a password reset. If you have common notification enabled when someone leaves a comment on your site, the site itself is going to notify the administrators. So that is the site email address. From here is where that email will come from. The one at the bottom is the email address of the administrator. So I can say something like super user. They can be different, they can be the same, but usually they are different. And if the super user, if the admin username forgets its password, an email is going to be sent to this email to reset it. Another thing that you are prompt, and even though it is not required, it is recommended, is to specify a country. So feel free to choose the country that you come from. In this case, I'm going to select the Czech Republic. And for the default time zone, I'm going to select Prague. Ooh, one moment. So why do you need to provide this information or what is it useful to provide this information? Drupal is very intelligent and it is able to determine a lot of things by giving this data. For example, in the Czech Republic, the currency is not euros, it's not dollars, it's something else. The format of the dates is different from what people in the States uses. The way that you format numbers, like what is the decimal and the thousand separator, that is different. So based on the default country, Drupal can apply what is called localization and then infer some of that information when presenting data to the user. And in terms of the time zone, Drupal is able to do automatic time zone conversions. Imagine that we are at DrupalCon. Some of these presentations are being streamed for people all over the world. So you can say this workshop is happening at 10.30 a.m., central European summer time, I think it's the time zone. But someone in Nicaragua, where I am from, it's a completely different time zone. If they register for the online event, they are going to automatically get the dates and the times shifted to their local time zone so they cannot miss the events that they want to attend. So again, Drupal is doing a lot of things behind the scenes, so long you provide that information. And if you want, you can ask Drupal to check for updates, which is generally a good idea, and also to send you email notifications when there are updates, which is also generally a good idea. So I'm going to click Save and continue. Just as a reminder, anything that you see here can be changed later. So don't feel that it has to be perfect the first time. Everything can be changed later. So I'm going to click Save and continue. Congratulations, you have installed Drupal. And you are welcome with this wonderful message from the community with links to how to get started with Drupal, how to create content, how to extend Drupal beyond what it was originally meant to be used for. Before doing so, I want to do a short exercise. I said before that anything that we enter in that form could be changed. So I want you to change the site name. Instead of being Pract 2022, I wanted to say Drupal News. So we're going to be exploring all the elements in the menu as we work during the workshop, but for now just follow what I'm doing and we'll see how easy it is to make this change. Before doing that, can someone guess how many clicks do we need to do to be able to change the title of the site? Two, one, wow, one. Any other guesses? Okay, that's very conservative. I mean, that's, but let's see. I'm going to click on Configuration. That's the first one. So let's click on Configuration. Then on the right side, you should see System and then Basic Site Settings. So we're going to click there, Basic Site Settings. That is the second one. Then in the site name, we're going to write whatever we want, in this case, Drupal News. And then we're going to ignore for now those settings. We're going to come back to this page later, but for now go to the bottom and click Save Configuration. So technically, with three clicks and type in the new name, you already did the job. We're going to cheat a little bit and we're going to click the Home link. This is called a breadcrumb. When you see links with arrows in between, in Drupal, we call them breadcrumbs. So we're going to click Home to go back to the homepage. That is my fourth link. And I can verify that my site name was changed. Again, back in the old days, when you had to manually modify CSS and HTML and JavaScript, this would have been a longer process, but in this case, it was relatively fast. Now, let's start doing what Drupal does best, creating content and managing content. So if you follow with the document, I already provide what we're going to do. The first three things that we're going to do is create articles. This is going to be the title for each article. These are going to be the tags. For the body, you can select any text. I'm going to give you some hints in a moment. And for the image, you can upload any image. But basically, we want to create three articles. For the text, you can go to this site, libsun.com, and I have it here. And at the bottom, you can change this number to something higher, in this case, 25, and click the generate loading ipsum button. And then you will have some random text that you can copy and paste. So we don't want to lose time trying to come up with very creative articles. We just want to see how Drupal handles them. So bear with me here. And if you have, there are different text generators. If you have a different one, feel free to use that. But I will be using this. Okay, so following my own example, I'm going to copy the title. The first beta of Drupal 10 has been released, and this is true, it came last week. So there are multiple ways in which you can create content in Drupal. And the more that you work with it, the easier it will be in the future. When you haven't created content at all, in the front page, you have this message. And when they're getting started, step number two, create content. You can click that link, and by default, and this is in the standard installation profile, you can choose between creating articles and basic pages. We're going to be doing the article first, learn a little bit about notes in general, and then we're going to explain why we have two options, what are the difference between those two options and how we can add even more of them. But for now, let's just do something functional, and then we will come back to it to explain how things work. So I'm going to click on article here. The title I'm going to paste from the table that I provided. Yep. There are, as I said before, there are different ways in which you can come to this page. If you have not created content, what I did is one way. Another way is clicking on manage content, and then add content. So manage content, add content. We are actually going to be using different approaches for all the notes that we're going to create, but just for you to know, that's another way. Manage content, and then add content, and select article. So I'm going to paste the title. I'm going to copy some text. Try to copy between two and three paragraphs for all the notes that we're going to be creating. And then for the tags, you can copy them. Drupal 10 comma beta. Something important about tags, we're going to revisit them in a moment, but those are comma separated. So in this case, Drupal space 10 is one tag, and then the word beta is another tag. So in this case, we only have two, not three. In the case of images, I'm going to upload. This is just like dummy content. You can actually use real images. My dummy content is basically rectangles of different colors. For accessibility reasons, you should provide an alternative text for all of your images. And in this case, I'm just going to do it very simple. This is like a blue rectangle. Ideally, you have real content, real images, and real alternative text. But for the sake of the example, we're going to do with this. So for now, we're going to ignore everything on the right. We're going to come back to this in a moment. But what I did was just provide a title, copy some text into the body field, provide some tags, and upload an image with the alternative text. I'm going to click Save. And this is my note that has been published. So any piece of content in Drupal that is added this way, it's called notes. So that is something that you were going to be hearing a lot in the Drupal world, notes, notes, notes. So this is the first note. And how can you verify that? Because in the URL of the site, you should have your domain slash the word note slash a number. That number indicates the internal identifier that Drupal uses to tell apart different notes. Like this page is different from the next one that we're going to create, and from the next one that we're going to create. So Drupal uses a number to keep track of them. In this case, note one, because he's the first one. You can see some information out of the box, like who created the piece of content in this admin on this date. You can see the image. Very likely it will be formatted a little bit different from what you uploaded. That is something that we're going to talk about later, but Drupal has a mechanism to automatically adjust your images to different sizes and apply different filters to them. For example, if you want to have something gray scale, or if you want to put a watermark on the image, or if you want to crop and resize, or if you are uploading headshots and you want to focus on the eyes of the person, there are multiple filters that you can apply automatically for Drupal to process the image out of the box. So you don't need to make multiple versions of the same image if you don't want to. And that is something that is called image styles. I'm just mentioning it now, but it is actually a very powerful system in Drupal. And then we have the content and the touch at the bottom. We're going to ignore comments for now. And I want to edit the notes. I want to explore more what notes are able to do. By default, Drupal comes with what is called what you see is what you get editor. We see this bar here. This works something like Word that you can select text, make it bold, make it italics, you can create links. So you can do a lot of changes with this. You can embed images, you can embed videos from YouTube or Bing or some other place, and you can enable more modules which will give you more buttons. Like I have seen embedding tables, embedding tweets, embedding Instagram or Facebook posts and so on. Basically, the more modules, remember that the more modules that you have enabled on your site, the more features it is going to have. So keep that in mind. We're going to look at the right for a moment. And I want you to draw your attention where it says URL alias. So if you scroll there and click, you will have this option to enter an URL alias. Imagine that you are a very popular newspaper and that you have 1,000 articles written already. It is easier for us to remember phrases or words than a number. Oh, I read a very cool article on drupal.org slash notice like 35,054. By the time that you get home, you already forgot that. But maybe you said, oh, I read a really cool article on drupal.org slash getting started with Drupal Workshop. That's easier to remember. So in addition to having the internal identifier which is a number that increments by one every time that you create a note, you can also have an alias. So in this case, I'm going to say drupal slash dash 10 dash beta dash one. It is not mandatory that everything is lowercase. It is not mandatory that you have dashes to separate the words, but it is recommended. Just like most of the time, this is how it's going to work. Another thing that I want to point out right now, I am entering this manually, but there is a module that is called pathauto that will automatically read the title of your note and convert the words to lowercase and use spaces to separate the different words so you don't have to do this manually. But for now, let's go with it. I'm going to save. So I did two changes. I added some formatting to the text and in the URL alias section, I start with a slash and provide a URL alias. I'm going to save now. And in the URL, you see that it is now different. You can still access this piece of content as before if I change this to node one, node slash one. It will still be available there, but if people want to use the alias, that is also an option. I will do one more thing. I'm going to edit the note and I'm going to just mess around with it. I'm going to say Drupal 101 has been released. I'm going to remove all that text and say, hello world. I'm going to remove the tags. I am going to remove the image. Basically imagine that someone is hacking into your site and doing things that they shouldn't be doing. You can do any change that you want. I'm going to click save. Under the hood, Drupal has a system called revisions. And revisions is basically Drupal keeping track of every change that you make to your site so that if someone hacks into your site to do something wrong, or maybe it was a genuine mistake, you can revert back to something that was working or that was correct before. So in the tabs, in addition to edit and delete, you can see revisions. So we're going to click on revisions. You can see all the changes based on date and time and who made them. So far there is only one user on the site. That's why it says admin, admin, admin. But let's say that we want to revert to the version in the second row. So you just click on the revert button. You confirm that you want to revert. And what Drupal does is actually create a new revision, but with a copy of the values from the old one. And even though that sounds complicated, when you go to the view page, basically Drupal restores everything to what it was before. The title, the image, the formatting of the text, and the tags. So what I want to point out here is that you get this for free out of the box. If you don't change any settings for every content type that you create, you are going to have the opportunity to keep a lock of every change that is made. And if something happened by mistake or someone tries to do something bad to your site, you can fix that by going back to the revisions. And when you go back to the revisions, you can verify when the change happened, at what time, and who did it. If the person did it by mistake, you can give it a pass. But if the person was actually being malicious, you can block the user, and that user will not be able to do anything else on your site. So we should be taking a break already. Before taking the break, is there any question between installation or notes so far, yes? So the question is, when you revert a note, does it change the note ID? The answer is no. The note ID is going to be attached, the same number all the time. It just keeps a different number that is called a revision ID. That's something different, but the note ID is always going to be one. If you want a different note ID, you need to create a different piece of content altogether. But under the hood, Drupal knows the ID of the note and that revision that is currently active. But that note ID will not change. Yes? So the question is, if I want to make the same multilingual, how do I do it? This is beyond the scope of this workshop, but I'm going to tell you how you can do it. In the extent tab, we are actually going to do this, something like this later on, enabling a module. But in the extent tab, you can collapse some of these. And there is a multilingual section. So by enabling these four modules, you can do any translation that you want with Drupal. So you enable all of these, and we're going to actually work with enabling modules down the road during the workshop, but the translation system, we can have a full workshop of its own, so I'm not going to even try to do that today. Any other question? Nope, maybe? Okay. So if there are no questions, I'm going to start off five minutes timer, and we can take a break for five minutes. Feel free to keep asking questions, but also feel free to grab some water or something else. If you join after we had started, the link at the bottom is the one that contains the instructions to what we're doing today. I used to open it with two bottles, but then I would mess it up. Five minutes have elapsed already, so let's continue. I'm going to come back to my site. I'm going to go back to the homepage. So before doing anything else, I want you to draw your attention to something. Drupal is able to store content, you know, X amount of content, but it is not forced to show the same amount of content all the time or to everyone. Remember that when we created the node, we had three paragraphs, but if I go to the homepage, I only see one. Remember that when I was viewing the individual page for the node, the image was huge on top of the text. Now it has been reduced to a very small circle on the top left. So this is something that is going to be recording while we work on the site, but be mindful of that. Drupal can collect information, but once it is collected, Drupal can decide, or in this case, the site builder can decide what information is going to be presented to the user under what conditions. It can be show everything to everyone or shows specific pieces of data to different people depending on the permissions or the roles that they have on their site. For example, an event like this, DrupalCon, it is common that at a conference like this, someone does a headcount of how many people attended each session, but that information is not generally available to the public. That is usually information that is stored, that is collected only for the organizers. So you can create an event content type. You can create a field to collect how many people attended the session, but never show it to anyone except to organizers. So point being, you are not forced to show everything or show it in the same way all the time. And we're going to learn a little bit more about this. This is a concept that is called ViewModes. That's, again, something a little bit different, but ViewModes will allow you to control what information is going to be presented under different circumstances. Now let's keep adding content. We already created one node and learn about some of the properties that every node on the site is going to have the URL alias, the node ID, the options to roll back any changes. All of that is going to apply to all nodes that we're going to create today. As Amy June pointed out before, once you start creating content on the site, the welcome message from before is no longer available. So how you can keep doing it, how you can keep adding content. Under manage, you go to content, and then click the add content button. And before clicking it, I just want to draw your attention to something. Drupal tries to be consistent in terms of UI elements. So anytime that you see a rectangle with a plus sign and the rectangle being blue and the text being white, it's usually an indication that you are able to add something under the context that you are. In this case, we are adding content. As we're going to see later in the workshop, we will be adding content types. We will be adding fields. We will be adding views. All of those interactions are going to follow the same pattern, a rectangle in blue with a plus sign and text in white. So just be mindful about that. I'm going to create more content and again, another article. And if you have the handbook, you can copy the title. Let's not copy the text. Let's just copy the title for now. For the body, I'm going to keep using my Loren Impsum text. Feel free to use something different if you prefer. So copy the title, copy the body. Now the text. Once you have text already in the system, you can reuse them. For example, if I start typing, in this case, D, Drupal is automatically look for any text in the system that has the word D. So if you want to reuse them, just click on them. You can see Drupal 10 and in parentheses is a number. You can ignore the number for now, but in the same way that notes have a number, tags also have a number. And that number one in parentheses means that this was the first tag that was created. That is how Drupal can keep track of itself. Like you can, if you want, although it's not recommended, you can have two notes with the same title. You can have two tags with the same name, but Drupal is able to distinguish them by the internal identifier, which is a number, and that number won't repeat itself. Under the context of notes, the number will not repeat itself. Under the context of tags, the number will not repeat itself. Another thing to point out is tags is a special case of something that under the hood is called taxonomy terms. So when you hear tags and taxonomy terms, all tags are taxonomy terms, not all taxonomy terms are tags. But for the sake of this example, we can treat them the same. It is just a way to categorize content on your site. Taxonomy terms allows you to categorize content on your site. So in this case, I reuse one that already existed, but I can type a comma and type a new one altogether. So if I type CK editor, you can see that Drupal is trying to find something, like when you see this, the magnifying glass changed to like a spinning, a loading symbol. That means that Drupal is trying to look for something with that name, but it's not able to find anything. So Drupal 10 was already on the system and it was the ID one. CK editor is going to be newly created when I save this note. For the image, I'm going to select another one, I'm going to click save. After publishing my second note, I'm going to go to the home page and I can start seeing how Drupal behaves. All the articles by default are going to appear on the home page and the order in which they're going to appear is the newest that was published is going to appear first. All of this can be changed, but that is the default behavior. I am going to add one more note and in this case, I'm going to go to the page via URL and this is something that, as I said before, the more that you work with Drupal, sometimes it's easier just to type the URL if you can remember it than trying to click four or five times the menu to get there. So in this case, I'm going in the URL for my domain slash note slash add and I'm going to be in the same page as before. So domain slash note slash add and I'm going to add a new article. Again, I'm just going to copy that title I am going to copy some learning ipsum text and this time I will copy the text. There are two commas, there should be only one. I'm going to fix that and I'm not going to upload an image. This time I don't want to upload an image. I'm going to click save and I want to talk a little bit more about taxonomy terms. Drupal is very, very generous. Sometimes it will give you things that you never ask for and tax is one of those examples. Every time that when you are creating an article, you are attacked, Drupal is going to automatically give you a page for every piece of content that has been tacked with that specific value. For example, if I scroll down, this is the homepage. If I scroll down and I click on Drupal 10, this is actually a link and if I click there, I will see all the pieces of content that have been tacked like that. So again, Drupal is giving you stuff that you didn't ask for. Sometimes that is useful, sometimes it is not. So it is up to you to decide where you want to keep them or remove them or somehow modify them. Everything is possible but just be mindful that every time that you are at taxonomy term, Drupal will automatically create a page that will show all the content under that taxonomy term. Okay, so we are basically expert already. We have created three notes, all of them have been articles. Let's try something different and let's try to spot the differences. Let's go to content, add content and now we're going to select basic page and I want to volunteer too to tell me what is different between these and what we were seeing before. We just created three articles and this time I selected basic page instead of article. What is different? The basic page is like a home page. Yes, actually we're going to use the basic page to be the home page of our site but in terms of the form that we see in the screen at the moment, what is different between these and what we were doing before? Exactly, no tax and no images. So this is something that again might seem silly but it is very, very important. When you see articles, when you see basic pages, those in Drupal are called content types and the content type is a template to collect information. The content type for article includes a template that asks for four things, the title, the body, the tax and the image. The content type for basic page is a template that only asks for two pieces of information, the title and the body. As we're going to see later, we're going to create a custom content type and the template is going to be different again. So associate the word content type with a template to collect information from the user and you can have two, three, four, five or as many content types as you need on your site to be able to collect the data. We're not going to talk about fields just yet but what you see here, title is a field, body is a field. When we saw before tax, that was also a field and the image, that was also a field. So another way that we can put this is the article content type has four fields, the basic page content type has only two fields. Again, this is a relatively silly example but when we start creating our own custom ones, we're going to actually see how useful this is. For again, we're going to follow the handout and for the title, we're going to say welcome and I'm going to paste some text and before saving the note, I want to create an alias. So this is going to be a slash welcome. So my page is going to be title welcome, some random text and on the right, on the URL alias, I enter a slash welcome and I click save. Now, if you can spot this, it means you are paying very, very close attention but is there anything missing between the title and the text that we were able to see before with the articles? Yeah, the admin name and the date. In Drupal, that is called the tagline. So again, articles are configured by default to show the tagline. Who created the article and when? Basic pages by default are configured not to show the tagline. So that is yet another thing that you can modify on a content type by content type basis and those will be the defaults. Depending on the permissions of the user creating the content, they will have to adhere to those defaults or they might be able to overwrite those defaults but just be mindful about that. So yes, you're paying a lot of attention. Now, I can see my page here. I know that I can access the page by going to a slash welcome on if you are counting like I do. If I go to node slash four, I also visit the same page Y because this is the fourth node that was created. So under the hood, Drupal knows that this is ID number four. You can either access a page by the ID or by the URL alias. Now, just a guess. I am not expecting right or wrong answer. If you can raise your hand, if I go to the home page, will I see the welcome node over there? Yes or no? Who thinks that we will see it there? Nobody? Who thinks that we will not see it there? About half of the room. So I don't know what's a third option. It's yes or no, but let's see. I'm going to click Drupal News and for the last group, you were right. We are not seeing the welcome page here. Again, we know that the content is there. We can verify that in multiple ways. We can click in my back arrow in my browser. I can go to slash welcome. I can go to slash node slash four or something else. I can go to manage content and before when I was just adding content without paying too much attention, I can scroll down and I can see all the pieces of content added to my site. So it is there. I can click on it, I can edit it, I can do different operations. But what happens? This is another difference in content types. By default, the articles are what it's called promoted to the front page. That means you create an article, it will appear on the home page. Basic pages do not have that setting turned on. You can modify it. I as an admin can modify it. But in this case, I will not do it. We'll actually benefit from this to explain a few other things around. Let's do something. Let's change the home page of our site. How do we change the home page? We have already visited that page before. If we go to manage and then configuration, again, on the top right, under system, basic site settings. So again, manage, configuration, on the top right, under the system category, basic site settings. This is where we changed the site then before. But if we scroll a little bit down, you can see a front page section. By default, it says node. So we can change it to something else. You can change it to node four, which is the welcome page, or you can change it to slash welcome, which is the URL alias of that welcome page. It's up to you. Normally, you are not changing the home page often. Usually, you do it once and forget about it for the rest of the life of the site. But be mindful that you can either do the node ID, the URL alias, or as we're going to see down the road, if you create a page using views, you can also use the path to the view as your home page. But in this case, I'm going to keep it simple. I'm going to select slash welcome. I'm going to save configuration, and then I'm going to go back to the home page. And sure enough, Drupal is respecting my choices. Was it a good choice? I don't know yet, but Drupal is doing what I told it to do. My home page is now welcome. What happened with my articles? Are they lost? No, they are not. If we go to manage content, we're going to see them there. The only thing that we did is modify Drupal's default behavior. Instead of showing the articles, we're going to show that static page called welcome. We're going to recover that when we do the exercise on views. But before doing the exercise on views, are there any questions about this so far? No? Okay. We're going to do something more interesting. We're going to create a custom content type. And after we do so, we're going to explain the benefits of creating a custom content type, because at the beginning it's not obvious. Like why do I need to go through the hassle of clicking 50 times to be able to have a template for events? Well, we're going to see when we leverage the different features. So this time we're going to go to manage a structure, manage a structure, and then content types. Manage a structure, content types. For many of these pages, I also provide the URL. Like if you want to go directly there, I also provide the URL in the handout. So this is like what we were seeing before. It's not magic. It came from somewhere. And that somewhere is this setup. There is an article content type and a basic page content type that comes by default when you use the standard installation profile. If you have a custom installation profile or something else, this might not be available to you. So be mindful of that. The reason why we see them here is because the standard installation profile, in addition to enabling the modules and some themes, it creates this configuration for you. But now we're going to create some of that configuration ourselves manually. So remember the pattern, blue rectangle, plus sign, white text on blue background, add something. So we're going to add a content type. Remember, the content type is going to be that template to collect information from the user. So what do we want to collect? We want to collect event information. So the name is just going to be event. I'm going to skip the description for now and then on the submission form settings. Remember that I said that by default, with every content type that you create, you get two fields, the title and the body. In the case of the title, does it make sense to have the form element to have a label that says title? Maybe not. Let's change it. Let's change it to event name. We're going to ignore this for now. So on the submission form settings, we change that title to event name. The publishing option, this is where we start to encounter some of the things that we discussed in the past. By default, all notes are going to be published. Yes, we want that. Do we want all the events to be promoted to the front page? No, we don't want that. Because we want to have a custom static page as my homepage. So I don't want this to mess up with that. Sticky at the top of the list, this doesn't make sense to have enable on a, like on a general level. What this does is like, if you have 10 articles, but you want to highlight one on top of everything else, for that individual note, when you are modifying it, you can say, make it a sticky, and it will be the first thing that appears on the list and then everything else. But again, these are the defaults. And having that option as a default for everything that you create, defeats the purpose of having something highlighting or more relevant than everything else. And then create new revision. If you uncheck this, Drupal will not keep the history for you. I do not recommend deselecting the option. Database storage is very cheap nowadays. So it is not something to worry about. And if at some point, because I have work on sites like are huge, you need to purchase your data. There are different ways that you can do it, but let's not fix a problem that doesn't exist yet. And it is better to have the revisions enabled by default and clean up after the fact, if needed, than someone hacking into your site and not being able to recover what you had before. So let's just leave it enabled by default. So under publishing options, we will have published and create new revisions selected. Then display settings. This is what I refer to the tagline. Do we want to show the author and that information, yes or no? I'm going to select no, because is it relevant? Who created the page for the node? Not really. So I'm just not going to show the tagline. So I'm going to deselect that. And in the case of menus, do I want to allow the user to add the event to the navigation of my site? Imagine that I have 50 events and then I have 50 elements in my navigation. That doesn't make a lot of sense, right? So I'm going to remove the option. Again, these are defaults. Some users will have permissions to override those defaults, others users will not. So what you do here is set the defaults. So let's review this page before I click save. I added a new content type with the name of event. The submission form settings, I changed to event name for the label of the title. Publishing options, yes published, yes created in revision. I do not want to show the author and their information and I do not want to allow the nodes of the event content type to be added to the menus. So I'm going to save and something that you're going to learn in Drupal is when you click save, Drupal will ask for more or give you more. So in this case, I am landing in what is called the manage field interface. So this is where I can modify what field information I am going to collect using this template. So pay attention for the moment, don't follow me. This part is not necessary that you do it, but I just want to demo it. I'm going to open a new tab for the content and I'm going to try to add content and I can see already event being listed. That means that the content that I just created, I can already start creating nodes of that type. And if I click there, you can see that instead of title, I see a name because that is what I defined in the previous screen. And I have a body and then I don't have anything else. Again, don't do this, we're going to actually do a lot of changes in this page before going that again, going there again, but be mindful that just by creating the content type, you can already start adding content. Now, does it make sense that in the context of an event to ask the user for a body, what is the body of an event? Doesn't make a lot of sense, right? So it might be more useful is if instead of body, the label will be description. So how do I change the label? I can click on the operations, edit button, and for the label, I change it to description. I'm going to save. Again, I don't want you to be switching too much, but I'm just going to show it. If I go back to the page and I refresh here, instead of body, I will see description. Again, the whole point of this is to emphasize the fact that my content type is the template to collect information. You can change the labels, you can change how many elements you are going to collect, and so on. Now, I want to collect, let's see here. I want to collect dates because this is an event, it is important, it is relevant to collect the date in which the event occurs. So we're going to add a new field to my content type. Again, a new field to my template. So add field. And this is where things start to get a little bit technical. In the add new field, you see things like Boolean. What is a Boolean? Why do I have three numbers like decimal, float, and integer? Maybe integer makes sense, but why is the difference between float and decimal? Why do I have these so many options with text? Let's try to keep it simple for today. Just to make it clear, Boolean means yes or no. So if you have a yes or no question, you can select a Boolean field. In this case, we want to collect dates. So we're going to select on the general date. And then the label is going to be date. Save and continue. Now, don't click too fast before the next setting. You are from what date type do you want to collect? Date and time or date only. So under date type, select date only. How many values do you want to collect? In this case, for simplicity, even if a date is a multi-day event, we're just going to collect when is the start date. So only one value. The important part here is selecting date type. We save the field settings, and again, we're not done. We keep adding more configuration. Because this is an event date, it makes sense to require the field. Like otherwise, why would I be adding an event if I don't know the date? So the date is going to be required. We're going to leave the default for now. We're not going to touch it. We're going to save settings. Now I have three fields, date, description, and title. Because title, you should not remove it. You're not even given the option to do so. All these other fields, if I click this arrow, I can delete them, but I'm not going to do that because we're going to use them. But that title, you should never delete because you should never have a node without a title. That's why you don't have the option. Again, I'm going to briefly switch to the template, to the form, to add the node. And now you see that date is being asked. So I'm going to add two more fields. One is going to be that type. And in this one, just like, trust me, this is the right option. We are short on time today, but if you want to discuss it after the workshop, I will be very happy to explain all of these options for the most part, the fields map to database columns and how they are configured. But for simplicity sake, we're just going to select under the text category, list text, and we're going to say type. Save and continue. The allowed value list, I am actually going to copy from the handout, only three of them, only one value. I'm going to make it required as well. And I'm going to click save. Now, if you are following along, I'm not, you haven't seen, the answer is in the document, but hopefully you haven't seen the answer yet. I added date and I added type. But I also want to collect the telephone. Maybe I need to contact the organizers for some reason. This is not a right way to do it, but from these options that you see here, which one do you think is better suited? To store a telephone number. We have numbers, we have text, and any answer that you pick from here is wrong. So, I am a firm believer that you need to make mistakes to learn, otherwise you will not learn enough. So, just say something that you know already that we'll be wrong, but which one do you think we should select for storing the telephone number? Anything under the number section, anything under the text section? Okay, integer, it makes sense. Telephone numbers for the most parts are only numbers, but in some cases you have dashes or you have vanity numbers like 800, Drupalcon, something like that. So, maybe text makes sense. As I said before, any answer that you would have given me would be wrong. Why? This is something very important in Drupal. All of those options under the hood have functionality attached to them. For example, if you select an integer, you will be able to define maximum and minimums, for example, if you want to specify a range. If you select an image, you will have the option to specify which file types are going to be allowed. You are going to have the option to specify where is the maximum and minimum resolution that will be allowed? What is the maximum file size that will be allowed? So, basically, every field type under the hood have either validation and or extra functionality attached to them. So, that is why it is useful to select the proper one. If I didn't know better, I could use an integer and it would work because maybe I just want to force numbers in my telephone number. But what you need to think about is what operations I am going to do with this piece of information, with this piece of data. Numbers, in general, are useful when you want to make mathematical operations, like if you want to make a sum, an average, a medium, a mode, something like that. A maximum and a minimum. Texts, if you want to do things like uppercase, lowercase, change the formatting and so on. In this case, the right answer is to select the telephone field. But the telephone field is not here. Why? I can assure you that Drupal core chips with the telephone field that you could use. But why we cannot see it on the list? Any guesses? Because of the country? Because the module is not installed. That is correct. So, if we go to extend, remember that when I was explaining the installation profile, I mentioned Drupal comes with those sense of modules. It will be impractical to have all of them enabled because not everybody's going to use them. It so happens that if I, and you can see there are like a ton. If it has a check, it means it is enabled. If it doesn't have a check, it means it is not enabled. And the list that we see here is Drupal core alone. In the country of space, we have literally thousands of modules that we can cherry pick from to add functionality to our site. This is just what Drupal core does out of the box. So I can scroll down, scroll down, scroll down, or I can do different things. I can collapse some of the elements. And I can see there is a section that says field types. And under that section, there is a telephone module that hasn't been enabled. How do I enable the module? I select it and I scroll a little bit down to the bottom of the page and I click install. So the module was there, but it wasn't installed. So I'm just basically going to do that now. After clicking install, you see the successful message there. And before leaving this page, I want to point out two things. The first is that remember that I made the assumption that I was only going to store the start date for the event. There is a separate module that allows me to store date ranges like Drupal core needs, not one day, it's four days in this case. So if you enable this module, you will have the option to specify the start date and the end date. Again, for simplicity, we didn't do it like that this time, but there is something else that it is available out of the box, but it is not enabled by default. Another option because that this is big, you can use this filter and if I type telephone, you can go quickly to the specific one that you're looking for. For example, content moderation. This is one that is used for publication workflows. Let's say that you don't want that your articles are published out of the box. Maybe you are the newspaper, you have the journalist that writes the article, but the piece itself needs to go through an approval process. There comes an editor. The editor will not be able to create articles themselves, but they will be able to modify, make adjustments to the one that were created by journalists. And let's say that before final publication, the department chief needs to give the green lights. So the department chief can go into the site. They won't make any modifications. They will just say you publish, like go live now. So if you have those needs, the content moderation workflow that comes with Drupal Core, which is only disabled out of the box, can give you that functionality. I am not going to enable it. I just want to point out that there are many modules that come with Drupal Core that are not enabled by default. That being said, if I go to a structure, content types, sorry, too fast. Manage, structure, content types. Many, many times I click contact forms by mistake. It's not that one, content types. And then for event, manage fields. I'm going to add a new one. And now under number, I have telephone number. That makes sense. I'm going to save phone. Save and continue. Yes, I only want to allow one element. I will not make it required because some organizers, they don't want to provide their personal phone number for you to call them at midnight. And that's it. This is what our template is going to be. So just by looking at this page, I know that when I am being prompt for an event, I will be asked for the title, a.k.a. the event name, for the description, for the date, for the phone, and for the type. So now that we have this, we can all go together to manage content, add content, and event. Now a couple of things that I want to point out. First, notice how some form elements have a red asterisk and some do not. If it has the rest asterisk, it means that they are required. You need to provide a value for them. If not, you can ignore them, save the form, and it will work. Now, the information that we're going to use is actually in here. So basically, I ask you for two things. One, do this on your own. I will be creating the notes myself, like one after the other. So you can also do the same. But do it in the same order that they appear on the table. Like Drupal competes will be the first one that you create, Drupal Day Portugal, the second one, and so on. Because this is going to be important for an example that we're going to run later. So let's all take some time, maybe five minutes to do this. And when I am done, I will open it up for questions if there are any. Yes, if you go to structure, content types, you can go to manage fields and then switch to edit, or you can click the arrow and go directly to edit. And then you can say, enter information about the event. You can actually use HTML here in that element. Let's see. And if I click save, when I try to add content, it is there. But I'm just going to add the ones myself. Okay, I'm done creating the content myself. We are about 20 minutes to finish the presentation. So what I would like to do instead of everybody following every single example that follows is pay attention. And at the end of the demo that I'm going to do, I'm going to open it up for questions. And if you want to be with me one hour after the official end of the training, I am more than happy to stay here with you. But there are a few things that I think are very important that you see, not necessarily that you do for now, but at least be aware that they exist so that when you have to deal with them down the road, you know what questions to ask. And as I said before, the extended version of this workshop is going to be available next month on my website. And if you speak Spanish, there are already recordings on YouTube that I can point you to. But if you don't speak Spanish and one English version, I will record it and publish it next month. So let's talk about the content type. Remember that I said that the content type is a template to collect information. In some cases, you need to be mindful how you ask information, in which order you ask for information because it might affect how users are willing to provide accurate data into your site. So in this case, it might make sense to have these fields, day, type, and phone to appear early on in my editing form instead of having to scroll down all the way to the bottom. So how can I rearrange that template to collect information? If I go to a structure and I go to content types for event, manage fields, this is where we were before adding and removing fields or changing labels. But I can also go to this tab that says form display. And in here, I can do many things. For example, I can rearrange how the elements are going to be presented in the form. But also I can change what input elements are going to be used for the prompt itself. So notice how type at the moment is a dropdown. But I can change type from being a select list to being check boxes or radio buttons. If I do that, and then I save this form, notice that I did two things. Move description all the way to the bottom and the type I changed to check boxes and radio buttons. So if I click save here, and now I modify my, refresh my page, the form is different. All the data is the same, but the way that you presented is more user friendly. The elements that are required appear at the beginning of the form and the more that you scroll down, that are optional elements. And type instead of being a two click operation, now I just click, click, click, each one click on. So it's one way to modify how you collect the information. Something similar happens to how you display the information. If I click on view, notice how you get the title, the description, and then the date with this long format. We are not supposed to be showing time. Why do we have the time there? And this, you know, or thing here. Something similar. Next to the manage form display, you have the manage display tab. And in here, you can move things around. I can put the description at the very bottom. I can put the labels in line if I want. And notice that for dates, you have this gear icon that you can click and then you can modify the format to use. So instead of using that format, I will use, you know, oliverum medium, for example. All of this you can use by default or add new ones to your liking. I'm just going to use this one because it is convenient. Going to click update. Notice how, because I am using the proper type of a field, in the case of telephone, I have the option to use plain text or telephone link. I'm going to leave it as telephone link and I'm going to explain that in a moment. I'm going to click save. If I come back, again, I'm just going to refresh the page. The data is the same. The only difference is how I present it. Now, date and time appears at the top. In the case of the date, you can see the format is now different and I'm going to look for an example of a node with a telephone number. The telephone number is not just text. You can actually click on it. Depending on the device that you're using, you will be able to actually make a phone call. If you go from your phone to that URL, which is public, dev, dashprag, that instructor dot pantheonside.io slash node slash eight, you go to that page and from your phone click that, it will prompt you. Do you want to make a phone call? Yes or no? Because Drupal, if you choose the proper field types, is going to make sure to use semantic HTML elements. And in this case, if it is a phone, you might want to do a phone call just by clicking on it. So if your device supports making phone calls, you will be able to do it out of the box. Let's say that you have the Skype login installing your browser so that you are allowed to make phone calls the same. You can click on the link and Skype is going to start making a phone call. Something similar happened with email addresses. You can have an email field and if you click on it from your phone, maybe you're using Gmail or you're using Apple Mail or you're using something else, it will open the email application and you can define, even if you want like the two address, you can define the subject of the email right from clicking up a link on the interface. In the case of a desktop computer, on a Mac at the moment, it will open the mail app and try to send the email. So that is why it is important, one of the many reasons why it is important to use the proper field type because when you do that, you are giving Drupal enough clues to use semantic markup that will enrich the experience of the user based on the capabilities of their devices. So I know that was a mouthful, but hopefully I conveyed what I wanted to say there. Another thing that I want to do, again, this is a demo, you don't have to follow along, is recover what I lost before. Remember that at the beginning I have my articles out of the box. Depending on how you look at this, it is like 10 clicks or it is something more involved. But let's go with the easy approach for now. I'm going to go to a structure. I'm going to select views. This is a completely new concept. Anytime that you want to make a listing of something in Drupal, very likely you are going to resort to views. So list of something views. In this case, I want to list my articles. I'm going to create a view for my articles. So I'm going to click add view. I'm going to say the name articles. I want to show, what do I want to show content? Views can be used to show different things. If you click there, you can show comments, users, taxonomy terms, files, and many more things that are not listed here. But in Drupal, the word content is a synonym of notes. So I want to show notes of type. Do I want to show all the content of my site or maybe only articles? And if Drupal is smart enough to know that if you are using articles and that content type has tax, you can say I only want to show articles with the Drupal 10 tag. In my case, I want to show all the articles so I'm not going to select that option. How do you want them sorted? The new spheres, this is basically the same behavior that we saw before. As you create more articles, they will be appearing at the beginning of the page. What do you want to do with this? I want to create a page. What is the title of the page article? What is the path like domain slash what? Slash articles. What do you want to show? For now, I'm just going to select the defaults to show you that even by selecting the default, you get something useful on formatted list of teasers. These teasers refers to view mode. I have given a presentation in which I describe different concepts and I go more in depth about view modes. But again, there are whole Drupal representations that you can watch just on this subject. So I'm not going to try to explain it at the moment. Let's say that I am a very prolific writer and I have one article every day. I don't want to show 100 articles on my homepage or on any other page. I can say show 10 at a time and then break it down. Show like next 10, next 10, next 10 and so on. So that is a pager. That is called a pager. You want to show 10 elements at a time using a pager. Then you want to create a menu link. Yes, we're in the menu. There are many. Normally, we're going to be working with the main navigation menu. What is going to be the text that is going to appear in the menu itself, the article. Do you want an RSS feed? Yes. And notice that the more that you click, the more options that you get. So be careful with your clicks. I'm going to save and edit. And this is where the story begins like the previous page was just like, like a wizard. But this is the real views UI. Books, workshops, presentations have been spent just explaining this page. Again, for simplicity, I'm just going to click save here. I'm going to click on the view page link. And even though views is very, very powerful, you can, with a couple of clicks, get some useful functionality without having to dive too deep. And that is something that I want you to remember. The reason why I stuck with Drupal is because even though I came from a computer science background, I wasn't forced to know everything on day one. I was able to do meaningful work little by little. I started as a site builder. And the more that I work with Drupal, the more that I enjoy it, I learn how to theme, how to do module development. Now I specialize on migrations and other work. But you are not forced to know everything on day one. And that is very empowering. So don't feel like you need to do all of that. And just by doing so, in my navigation, I have the homepage and I have my articles. And basically I recovered what I had before. And there are 10 more minutes. I should be able to complete the last example. This is going to be another view. This is a more complex view, to be honest. But we'll allow us to look at more elements of the UI. Going to add a new view in this case for events. What do you want to show? I want to show content of type event. Notice that because this content type doesn't have the text field, Drupal just removes it. Doesn't make any sense. How do you want to sort them? We are actually going to change this down the road. So I'm just going to leave the default. But when it says Newer's Fears, means the last node that was created, that is the first one to appear. Just keep that in mind. Page settings, I want to create a page, yes. The title events, the path is my domain slash events. What do you want to show? We're also going to change later. But the reason why I'm going to leave the default is to show you how relatively easy is to change your mind. Like if you decide down the road that you want to do something completely different, in some cases with a couple of clicks, in some cases with a couple of development hours, you are able to accomplish what you need. But today we're going the easy route, it's going to be a couple of clicks. But again, leaving the default for now. Yes, I want to show 10 items at a time. I want to use a pager, I want to create a menu link. I'm going to add it to the main navigation. The link takes is going to be events. And I want to include RSS. And I want touch block because if I touch these, I will get more and more options. And we don't have that much time. So what I did was add a new view with the name of events, showing content of the event. This is not relevant because we're going to change on the road. We create a page, events for the title, lowercase events for the path. This is not relevant because we're going to change 10 elements at a time, use a pager, create a menu under the main navigation with the link takes events, and click save. Again, I really like doing something, seeing what it produces, and then going back and tweak it to my needs. So when you have a page, you can click the view page and open it in a new tab. And this is what I get out of the box. I am seeing teasers of the events, but I don't want that. I want something more compact in a table format. So some participation here. How many clicks do I need to change this to a table? Four? One? Wow. Wow, you are very, how do I say it? Hopeful, I know. It's keeping the word for me, but you are very optimistic. Let's see. How many clicks do we need to do to change this to a table? The first thing that we need to do is change the format under the format area. So click on format at least. Every link, every blue thing with another line is a link that you can click and get a lot more options. So under format, one click for on format at least. Two clicks to select table. Three clicks to say apply. Four clicks to say apply again. Five clicks to click save. And apparently if I go back to what I was before, I refresh and I have a table. It's not pretty, but it's a table already. So with five clicks, you can go from one presentation to something completely different. Now let's try to make this table more useful. Before, we were using what is called ViewMode. I remember that you were prom, do you want to show teasers? Do you want to show the full content? Those are called ViewMode. When you select table, you have the option to add information to the table on a field-by-field basis. And this is another scenario in which having the fields as discrete elements to correct data is useful because if we put everything into the description, we will not be able to accomplish what we're going to do next, which is having different columns because how can Drupal tell apart from a huge blob of text? What is the phone number? What is that type of event? What is that description? It would be really hard. When you have separate fields, you can control the visibility, you can control the permissions on each of them, you can do things like what we're going to do is show them individually with different formats. So let's do that. Under the field section, I'm going to click Add. And this is where Views just gets crazy. You have like a hundred options. So what can you do to make this a little bit more easier to manage? Under category, for the most part, you are going to be working with content because remember content is associated with nodes. Nodes are associated with content types. So if we want to show fields that are attached to content types, they will be under the content category. And now you can start selecting the fields. I want to show the date. I look for date and I can select it here. Content, a person event. This is the machine name for the content type. And the other one was the type. Notice that I have content type that I don't want to show that. I want to show that the field type that appears in the event content type. Sometimes you need to guess. Sometimes you need to make mistakes. I have run this workshop like for seven years. So most of this is muscle memory but the very first few times were horrible. And there are recordings of that if you want a good laugh but I will not give you the URL to that video. That being said, I selected the two options type and date and now I add and configure fields. I'm just going to make few adjustments where necessary. In this case, we are configuring the date. So I'm just going to modify the format to be something more compact. And I'm going to click apply. And for the label, I won't do anything. Just apply. If you don't want to be switching to the other page, you actually get a preview of how the thing is going to look when you scroll down. And now this is more useful already but we can improve it a little bit more. How can we improve it? We can provide a label for this column that doesn't have any. So how do we do that? I scroll up to the field title and I say create label, event name, apply. Apply. And now I have a column. Let's say that I want to rearrange the columns. I want to put a date before the event. I can go up again and on the fields, instead of clicking add, I click the arrow pointing down and I can click rearrange and I just move things around. And for the record, there are these elements, these UI elements are accessible. So you can do the rearrangement with keyboard navigation and other approaches just for you to know. And this is getting better. Now I have the date. That's my field column, event name and type. Now there is something horribly wrong with this table and it's the order. Like for things like events, it makes sense to show them not based on when the notes were published but based when on the dates of the event happens when the event occurs. So let's fix that. Views is also called a query builder. I try not to focus on that part because there is a little bit of database administration and to be honest, you can go a long way without writing database code. Like I've been doing Drupal for about 12 years and I only started writing queries in the last five years. Then my first seven years of Drupal career as a developer, I barely ever wrote a SQL query. So don't feel like you have to do this. With that disclaimer, on the resort criteria, you can select add and you look for content category and you select date and then this is the date field that appears in the event content type. You select it, you apply it and you say sort ascending. In this case, apply and it doesn't work. Why it doesn't work? Because when you have multiple sort of criteria, the ordering which they appear is important. In this case, it says first order based on when the note was published and if for some reason there are two notes that have the same publication time and date, sort based on another field criteria. That doesn't make sense in this case, so I'm actually going to click on it. If you want to remove something, you can click on it and click remove and now I only have one filter criteria. When this is useful, imagine that we are in a conference like this one and we have speakers and the speaker is first name and last name. Chances are that two people have either the same first name or the same last name, so having two sorting criteria makes sense to provide some order to do that. In this case, it's likely that dates are going to be unique and if they are not, it's not a big deal. We could add also sort based on the title if they happen on the same date, but if not, that's okay. If I scroll down, this is looking better, but there is one more thing that we can do to improve this table and is remove events that already passed. How do we remove automatically something that already happened under the, and this is the cool part. It's unfortunate that we are on time and we won't be able to dig too deep, but under the field section, I can click add and I can click date under the content category. So, date that appears in event, add and configure fields. Remove, remove, I made a mistake. I added that under the field section and it had to be done under the filter criteria, so I just deleted it. Under the filter criteria, click add category content, date and then I can say operator is greater than or equal to. I can select a fixed date or I can select what is called a relative date. For a relative date, I select the second option. The terms here are too technical to be honest, but that's the way it is. And then you say today. This is not a magic word. This is actually a PHP string that happens to work. There are a few things like today, tomorrow, yesterday that you can enter here, but for the sake of the example today, we'll do it. If I click apply, it will automatically filter out anything that is already in the past. And if I click save here, the cool part of all of this is that when you create a build, Drupal will remember the way that you configure it and it will respect that when content is added or modified to the site. Let's, for the sake of the example, all of these are real events. If you happen to be in San Francisco in two weeks or in Portugal in two weeks, all of them are actually happening. But let's say that we made a mistake. The date for this one is not December. It's actually May. So I'm going to modify the note for May. And May already passed. So just by doing that change, making that correction, if I refresh that page, Drupal will remove that automatically. And this is going to happen for adding new content. This is going to happen for editing new content or for deleting new content. Basically, Drupal takes a snapshot of how you configure the view and the view is going to update itself based on the current content of the site. Because we are at a time, if you go to, most of you were following along. So you have a URL with a number. If you replace the number for the word demo, you can actually see the demo that I presented at the very beginning. What we see here, it's a block that was created using a view. If we go to the events tab, what we see up here, these are called exposed filters. I can allow my end user to filter based on some criteria. That table, you can actually make the hairs of the table sortables if you want. And this is not rocket science. Like it's a lot of trial and error, to be honest. Or coming to a workshop like this. But you can accomplish a lot of things in Drupal without having to write one line of PHP. So to wrap it up. There are two quotes that I want to share. One is kind of a joke because I said it myself. I don't think it is allowed to quote yourself in a Drupal presentation, but I'm breaking the rules today. A great way to learn something is finding a working example and breaking it on purpose. This has many benefits. One of which is when you see that error again, it's going to be easier for you to identify, to troubleshoot and to fix. So if you want to learn about migrations, sometime ago when I'm in the process of updating that, I wrote a book called 31 Days of Drupal Migrations. And I gave like 15 or so examples. You just clone the module, the example module, and you have 15 working examples of Drupal migrations with different degree of complexity. If you want to learn migration, you just copy the module, make sure that it works, and then break it to your heart's content. That's a good way to learn. And now on a more serious note, Leah Burro, author of CSS Secrets says that understanding the process of finding a solution is far more valuable than the solution itself. I often give support on different community channels and people sometimes they want the shortcut. They just want you to give them where they need to click for something to work. And that is fine. Sometimes you are under pressure and you need to deliver something the next day and you want to have a good night of sleep. But many times it's just like people not trying to learn. They just want a solution, but they are not trying to learn and understand how things work under that hood. So I encourage you to be curious, to be mindful and to take the time to learn the platform that hopefully it's going to solve more problems that it causes. And with that, please join us to the contribution opportunities. Drupal is where it is today because people like you and me, who contribute time or knowledge to the platform, please fill out the survey. You should be receiving an email from the conference to provide feedback on how I did and how I failed. And thank you very much. I will be around if there are questions. Yes, at least for a month.