 Alright, well welcome everyone to DrupalCon Day 2 or 3 if you did training. It's my pleasure to present today Views for Beginners in Drupal 8. So my name is David Needham, this is my wife and little one who is now almost 2 years old. I'm going to be using them a little bit for a couple of the examples so I thought it would be good to show them and I'm super proud of course, good family. So I've been doing Drupal for almost 8 years and over the years I've seen a lot of roadblocks with kind of the learning curve of Drupal. It can be very difficult for a lot of beginners to step in and learn how to do what they need to do just because the interface is confusing or the terminology is unique to Drupal or whatever, there's a lot of reasons for it. So it's been a little bit of my mission in learning Drupal and talking about Drupal is helping people get over those roadblocks or get over those speed bumps to do everything that they need to do to really empower them to use Drupal to the most that they can. To kind of that goal or that mission I started a nonprofit called Enjoy Creativity. It's specifically a nonprofit that helps churches and ministries with web design and SEO and marketing and graphic design and stuff like that. So really kind of helping them to leverage Drupal in a way that is good for their organization. As a result it's also been great for nonprofits. There's a ton of overlap between nonprofits and other faith-based organizations. So it's been good kind of meeting and greeting and kind of giving back to the community in that way. I'm also a partner at Triplo. Twin Cities based organization that helps freelancers with sort of business coaching, mentoring, kind of how to market themselves, how to set goals for their personal business, whether it's location independence or getting more money or saving for retirement or having more time for their kids, whatever it is. Everyone has a goal for their business and we try to help them kind of get to their goals. So yeah, that's really been my focus. Like I said, I'm based out of the Twin Cities. The Drupal community there is really, really amazing so shout out to that real quick. If you are anywhere near the Twin Cities or if you are able to travel a little bit, the Twin Cities Drupal Camp is the last week in June so it's just a month away. Before I lived in the Twin Cities it was my favorite Drupal Camp. I traveled from San Francisco to go to the Twin Cities Drupal Camp and eventually it led to me moving there. So it's a very good camp. Like I said, if you can make it, it'd be great to see you there. So I think it'd be good. This is a beginner session to jump right in and say, what is views exactly? If you asked a friend, if you kind of looked it up, you might see views as a query builder or the graphical interface but this kind of uses some jargon. It's a very technical description of what it is and that's not super helpful. If I asked my wife about this, or if I told her, if this is my answer to what is views, she would kind of look at me funny and not really understand. So to simplify this, views is essentially a way to make dynamic lists. At its simplest, a view creates a list that dynamically updates itself based on all sorts of criteria. So let's continue that example a little bit. Let's say I'm trying to describe my wife, Alicia, she does kind of a craft business from home. She wants to be able to create content on her website and then feature it throughout the website. So maybe she has a blog post. She wants to, of course, create the blog post. She'll write it. And then maybe on the front page she has, you know, here are my recent blog posts. Here are some of my recent products. Maybe she has a rotating slideshow. It's like, here's the featured thing that I'm featuring. And then she has like a blog page where it has all of the blogs listed or all the blog articles listed there with a page or at the bottom to flip between them. So if you're not using views, if you were just jumping in to Drupal or whatever and if you're writing this code from scratch in HTML or whatever, you'd create the content, of course. You have to start with the content. And then you'd have to go to all the places that the content exists. All the places you want to feature the content and actually change it. So, you know, if there's a blog on the front page it has here our upcoming, I'm saying not our upcoming events, but our, here are the recent blog posts we've written. You'd have to go there. You'd edit the blog. You'd type in this thing. You'd put in the link. Okay. Now there's the full page. There's the blog page. You'd have to go to that page, edit it, update the description, update the link, update all that information, the featured image and all that. That's tedious. It's not super great. And then if we have a slideshow and she wants to feature it on the slideshow, she'd have to probably jump in with a little code. She'd have to know the jQuery or whatever's generating the slideshow, excuse me, and make it so that it updated with that content. Or if she knows a little bit of SQL, you could make the site dynamic. You could, you know, you could essentially create your own CMS and, you know, use SQL, make it dynamically update in all these places. But this is a beginner's session. As beginners, you guys don't have to know code. You don't have to know any code at all to use views with tons and tons of power. So those aren't really valid options. My wife doesn't know any code, and that's okay. She can use views to create dynamic lists on her website without any code whatsoever. So the simplified workflow here, if we start using views, we can kind of create content, you know? So we go to the blog post, rewrite it, we publish it. And then my wife can have some chai. And that's really what she wants. She wants to publish her content and have it just automatically go where it needs to go. She doesn't want to have to go to the individual pages and make updates. She doesn't want to write any code. She just wants to write her content and kind of move on with her day. And views lets you do that. So here's an example. This is a, you know, somewhat typical front page. We have the rotating slideshow, and we have some kind of featured content on the bottom here. This entire page is dynamically generated with views. There's a number of views listed here. And you don't have to statically create or edit these yourself. You create the content, and it automatically flows where it needs to go on the site. So here's a quick call out. So we have the slideshow. That's a view. Maybe it shows the content that specifically has the check box that says featured or has the slideshow image or however you want to do it. It's a view. We also have this latest sermon section here. It's also a view. It just automatically updates to show the most recent sermon content that's been created. We also have a list of announcements. These are listed chronologically. This actually takes two content types. It takes events and announcements, which are distinct in certain ways. And it puts them together in the same list, sorts them chronologically, puts them on the page, and then shows a nifty little link at the bottom to view the calendar for the full blown calendar you'd expect, or the list of all announcements. And then we also have volunteer opportunities. So it's just another way of displaying content. In this case, this is content that's been specifically featured for the front page. So on this page, there are at least four views here that are automatically flowing through content that we've created. We don't have to change these once they're set up. They just automatically handle the content that we pass at it. So you might be asking yourself, how does views actually work? Well, I was talking to Tess Flynn. She's a great Drupal contributor and another member of the Twin Cities. She kind of gave me this analogy and shared some of these graphics with me, so I'm happy to share these with you as well. She told me it works a little bit like a bathtub, okay? So we have a bathtub, and this is where the story with my daughter comes in. So I'm giving my daughter a bath. We have the bathtub. Okay, so it's structure. It's what we need to take a bath. Without the bathtub, you really can't do much. This kind of is the analogous to the networking, the hardware. This is the server. This is kind of the structure that contains our website. Next, we need some water. We need to fill up the bathtub. This is our Drupal site, essentially. It's everything that is contained within Drupal, the fields, the configuration, all those things. But there's something missing. If I was going to give my daughter a bath and I showed her, it's like, here's the bathtub and here's the water, she would not be excited about this. She would be like, okay, there's something missing. It's duckies, okay? So we have duckies. We have duckies in our bathtub that make our website interesting, that make it unique. This is actually the content. A website without content is not really helpful or effective or useful or, I don't know, there's no reason for it. So the duckies are the content. And duckies come in different sorts of flavors. They come, in this case, different colors. If you've seen all the duckies that you can get, you can get like Marvel duckies with Iron Man and, you know, Wizard of Oz duckies and whatever. My point is, there's different content types that differentiate the different types of duckies here. And what we, you know, this is our website with content in it, but it's a little disorganized. We just have this big bathtub full of duckies and they're all kind of floating around all over the place. Well, next, we introduce views. Views is essentially a net that helps us keep our ducks in a row. It helps us take the duckies that we want, sort them, put them in a particular order and then keep them in a particular way so that we can display them in an ordered fashion with a particular set or whatever sort of subset that we want so that other people can view and consume and use the content that we're actually trying to share with them through the website. So to recap that analogy, if that didn't really work for you, basically a view is a, it's grabbing a selection of content, it's formatting it and sorting it into a particular order, and then it displays it in a particular way. Whether it's a block or a page or a RSS feed or a slideshow, it doesn't really matter how it's being displayed. It is a view at that point. So I've used the word displays, I've kind of thrown that around. That's actually a terminology within views. You create the view which has sort of the structure of what am I actually trying to aggregate, what am I trying to show, what's the content? And then displays help you show it in different ways. So for example, the example I gave earlier with the blog post, you might create a view that says show me all blog posts sorted chronologically. Then you'd create displays to say, okay, well I want a page display. It shows up at a particular URL, it has a menu link, it's a full blown page that shows the list, and I want to see 20 on that page with a pager. There might also be another display for the block. Maybe you want, here are some recent blog posts. Maybe instead of 20, that'd be kind of intense to have 20 on the front page. Maybe we only have three or five, a smaller number. Instead of showing the teaser of the blog post, the first paragraph or whatever, maybe we only want to see the title, the author and the date or something like that. It's essentially the same content displayed in a different way. So a particular display contains all of the filter criteria, the sort criteria, the thing that makes it ready to be displayed and then the actual particular way that it's being displayed on the page. All right, so I have a demo here. This is a presentation I've given before, but I've never, I've always done just a live demo. I've been encouraged to not do a live demo this year, so I'm going to flip through some slides. I still have the live site up that I can play with if we need to, but I have screenshots of everything. If you have any questions or can't really see anything, feel free to shout out, let me know. But yeah, so here are some things we're gonna step through. We're gonna start by installing views. But actually, before we do that, we need to set up Drupal 8. In this case, we're using Drupal 8. We're gonna use a standard installation profile and we created some content. It's really hard to create lists or dynamic lists of things without content to actually use, so here is everything that I did to prepare for this demo. I installed Drupal, I created, I think, three pieces of article content. That's it. Next, installing views. So I mentioned I've given this presentation before. This is actually an old slide. This is what it would take to install views in Drupal 7. In Drupal 8, things get a little bit easier. You would typically have to download the views module, you'd have to download the chaos tools module because it's a dependency on views. But fortunately, in Drupal 8, both of those are views at least as part of Drupal Core. So we don't have to go and download it, it's already there, and even chaos tools is already incorporated. A lot of the features and APIs are already incorporated with Drupal Core, so we don't have to go and download anything. In fact, we don't even have to enable the modules. If we choose the standard installation profile, it's already installed, it's already enabled for us, and that's because views is used by pretty much every website. It's assumed that you're going to want views on your website, so it's just already enabled, installed, ready to go. So yeah, to install views, you just move on to the next step. There's not really anything to do there. So here we go. We have our Drupal website. You install it, boom. You have Drupal 8. If you've never seen Drupal 8 before, you'll notice some things that are a little bit different. I'm going to try to highlight some of those as we go through, since this is the first time that we've done kind of a Drupal 7 to Drupal 8 comparison. I should also say real quick though that anything that we talk about today is directly transferable to Drupal 7. A lot of the techniques that I'm going to be talking about are the same. There's very, very little difference between what happens in Drupal 7 and Drupal 8. It's just some of the configuration is slightly different. The screenshots, what you see on the page is going to be a little bit different. So here we go. We have our site. The first thing we need to do is go to Structure and Views. That'll give us this page right here, where we can see all of the views that are currently being used on the website. We have a bunch of views already that were created with Drupal. That's because in previous versions of Drupal, it was kind of hard-coded. It wasn't using views out of the box since it wasn't in core, so it was really hard to kind of change a lot of the administrative pages that show dynamic lists in the front page and things like that. So simply by having views here, all of those pages have been rewritten in views. So if we needed to change one of the administrative pages that come out of the box, it's really easy to jump in and just click Edit and we can add fields or change configuration or whatever you want to do. But we're interested in creating a new view. We're gonna feature our article content, so we're gonna click the link here that says Add New View. That takes us to this page where we can type in some information about our view. We're gonna add the name, we're gonna call it News. We're gonna have a short little description to describe to administrators what this view is actually used for. And then the next part here, the view settings. I heard it described to me that if you can describe what you want to see in a view in a single sentence, views can probably do it. That's a pretty bold claim, I think, but the Drupal views team kind of took it literally a little bit when it improved the usability and by saying, okay, well, show content of type article tagged with, and there's nothing there now, but sorted by, newest first. Some other options here, instead of like, we're showing content, we want to see article content. You could also do users, you could do vocabularies, taxonomy. Any entity really can be used in views here. And then the next part here we have, we have the page settings. This is the first display that views is creating for us. It's going to be a page. We simply, by checking the box to enable the page, it assumes some of this information for us because we called the view News. It automatically filled in the page title and the URL for us. If you want to change those, you can. And then we have a display settings. How do we actually want this formatted? Do we want to see a table? Do we want to see a grid? Do we want to see just an HTML list, like bullets or numbers? In this case, we're going to choose unformatted list, which is really just going to be divs separated. So view rows separated by divs. And then we're going to show teasers. So it's going to be like the first paragraph or so, the title, the author, a link to view more, stuff like that. So that works pretty well for us. And then items to display, how many do we actually want to see on this page of News articles? We said 10 here. We also said we want to see the menu links. We want to add it to the main menu. We'll scroll down a little bit. And then it has a handy link here to add an RSS feed. So if people are subscribing to your content, they're using feed readers or something like that, all you have to do is check the box and it automatically creates it for you. And then it's doing that with XML here. All right, and then a little bit further down, we have another checkbox to create another display. In this case, it's a block. So this is going to be our latest news. In this case, we're saying five most recent news articles that were created. And we're saying here we want to see HTML list. So this is going to be bullets. We'll see a bulleted list that we can show on the front page or wherever we want. All right, so this looks good. We'll click save and edit. It'll take us to the views configuration page. Now, this might be a little intimidating, but it's actually not too bad. Views is very, very good at allowing sort of iterative changes, iterative experimentation. So it's great because you can click on any of those links, any of those blue pieces or that drop links like the ad with the down arrow. You can click those, you can do stuff, and then you'll see a preview. So actually before we do anything, if we scroll down the page, there's a preview here which shows what we have already. So it's our three content that we created. It's the page it's showing off here. So it's three on a page. It has a little photo that I uploaded for each piece of content. It has all the tags, the read more link, and all that, and it's, that's it. And because we said that we wanted a RSS feed, it actually gave a little link for the RSS feed at the bottom of the page too. So it's all kind of baked in automatically with just that one configuration page. But let's say there's something we want to change. So for example, right out of the box, the menu isn't, it's not put in the right menu. It doesn't really know which menu to put it in. So if we click the little box or the little link there for normal news, we can go to the, you get this little pop-up and we'll click parent, main navigation, done. And then that will put that into the main navigation menu at the top of our page. So we'll want to click apply. We'll close this kind of overlay, this pop-up, and then we'll want to click save. Actually, but before we click save, views is really good at reminding you to click save. It's very, very common when you're doing a lot of these iterative changes to just jump in, do some stuff, okay, it looks good, and then go back to the front page or go back to the page you were working on. So here it's telling you like, hey, wait a minute, don't go anywhere. You have unsaved changes. Don't forget to click save. But fortunately, it's kind of gracious with you. So if you do forget, if you don't click save, it's actually storing the configuration changes you've made in JavaScript. So if you come back to this page within a reasonable amount of time, your configuration changes will still be there. So you can still have another chance to click save before all is lost. But we didn't forget we're gonna click save and we'll go back to the brand new page that was created. So this page did not exist before. It's a new menu link at the very top called news. We click on it and we're seeing the news page. We just created our first view, our first display, a page display. But wait a minute, we also checked the box for block. I don't see a block on the page for the latest news that we created. Well, the reason for this, it's a very common question that I've received from beginners is I created a block, but it's not showing up anywhere. How do I get it to display? Well, it's actually very easy. And the Drupal 8 block system improves this a little bit. So to get there, we just need to go to structure and blocks. You'll get this nifty block layout page. So all of the blocks that are on the site show up on the left side there. And then on the right side are all the blocks that we're able to add into the regions, all the different places on the site where blocks can go. Listed here, we have lists, views, and the first one is news. News didn't exist before, that's the one we just created. So all we have to do is click that link. It'll bring this pop up, where it'll ask us some information about how we actually want that to be shown. So yeah, I wanna show the title because I set that in views. I wanna see five, that was the default that I chose when I created the display. And then we have some kind of visibility settings here in the middle, where or how do we want it displayed. And then we have region. Where actually do we want this to show up on the site? Regions might be things like head or foot or left right sidebar, content, content top, things like that. So we'll choose our right sidebar, and we'll save, and we'll go check it out. Before we go check that out, though, I wanna take just a brief rabbit hole, maybe. So if you are used to Drupal 7, and you're coming to Drupal 8, this is a pretty awesome thing. The new kind of restructured block system. It's been a problem where once you've displayed a block in one place, well, it's displayed there. You can't create another block somewhere else that's the same content, because you can't show the same block in two places, I guess, is what I'm saying. Well, fortunately in Drupal 8, this is completely redone. So you can click these links here on the side to create as many of those blocks as you want, as many instances of those blocks as you want, and you can put them anywhere, on any region, on any page, as much as you want. So we could put the latest news on the sidebar on every other page, but put it in the footer on the front page, or something like that. And it's totally flexible and easy, and it just works, which is, I'm pretty stoked about. So we click Save, and then instantly, back on our website, we have latest news. So it's not bad. It could probably be better. It's kind of just a list of links at this point, which is better than we had, but not super helpful. I'd love to see maybe the author and the date, like how long ago the particular content was created. So we could go back to structure views, we could go to find our view, we could click edit from there, and kind of reconfigure it. But there's actually a shortcut, really handy shortcut. This is also kind of redone in Drupal 8 to be a little more flexible, but if you hover over content, or if you hover over the blocks, or the header, you'll get this nifty little contextual link. So it's a little kind of pencil. If you click that, you'll get some options. The option we care about here is edit view. This is gonna take us back to the view, not just to the view that we were originally using to create this, but even directly to the display, to the particular block display that rendered that particular view. So it's a huge time saver, just to click edit, go straight here and you can configure what you need to do. So in this case, we were saying we wanna add a couple extra fields. We don't wanna just see the title, we wanna see the author, maybe the time ago, how long ago it was created. So to do that, we'll go over to the field section, we'll click add, and that's gonna create a popup for us that's going to let us add fields. There's a ton of fields, even right out of the box at Drupal Core, there's a lot of things you can add into this section. So it's really handy to use the search box and the filters at the very top. So if you type into the search, I know I need author information, I'll type author. It filters down the list to be one kind of concise set of options. I'm gonna choose one that says content authored by, that's going to be the username, the person who created that particular piece of content, as well as the authored on, so the date that it was created on. I'm going to click the apply this display button. And then it's gonna take me to the first configuration page of the first field that I'm adding. Notice here at the top, it says one of two. So we added two fields, so this is the first field that we're configuring. In this case though, I think this kind of works. There's a lot of options here and there's a lot of things that I'm not gonna have time to go into. But I encourage you to check this out to play with this later. If you're installing views, if you're curious about what some of these settings, like in all these field sets actually do, play with it. Go in there, click edit, make a change, click save, check it out. Or even use the preview at the bottom to save yourself from having to actually change what's on the visible on the website. But in this case, this actually works. I don't need to change anything about this field. I just wanna see the username and that's what it's showing me. So I'll click apply and continue. Okay, next we're on the authored on field. We need to configure some stuff here, but very little. We start with the date format there. The original, the default is long date, which would have been Monday, January 15th, you know, 2015 at, you know, 7.15 a.m. or something like that. It's a long format. I think that might be a little bit overkill for a sidebar block. It's a little bit too much, a little too verbose. So I changed it to time ago with a go appended. So in this case it'll say it was created five days ago or two hours ago or something like that. So that's about all I have to change here. So that looks good. I'll click apply this display. And then I wanna click save on the view. It'll remind me about that. And it'll take me directly back to the page I was on before. So another benefit of using the contextual link, clicking the little hover and then the edit view button, is that it actually takes you right back to the page you were on when you click that link, after you click save. So it's a huge time saver to make quick little changes like that. So yeah, so we added those two fields and immediately on the site we see we have the buy username and then how long ago the particular piece of content was created. So maybe I'm working on this. It looks pretty good. Maybe I wanna see the title followed by the credit, the author information. So on one line I wanna see example article by D8Views with the date kind of below it. This is pretty common. It's pretty easy to do. Let me walk you through that really quick because this is actually one of the many kind of understated features of views. It's just the flexibility and ease to reformat and change the content there, the fields that you're working with here. So yet again, we have to click the little contextual link. We'll go back to the view that we're looking at. We're on this page here. The first thing we need to do, first and foremost, we see the fields. We have the new authored by and the authored on fields. The first thing we need to do is actually reorder this list. We want to reformat the title. We want to kind of include it next to the title. And the way that we can do that, we can share information from between the fields, but the title is only going to be aware of fields that come before it. It has to do with the rendering process. It kind of renders the fields in order. So anything that you want to include on another field, you just have to reorder to move it to the top. It's a very, very common and kind of frustrating issue sometimes. But if you just remember, rearrange it, move it to the top. If you want to add it in another field, then it's not so much a problem. So I rearrange it. I put the authored by at the very, very top. I hide it and then I click edit on the title. So I want to edit the title. It brings up the title configuration here. I then go down to the rewrite results, the field set. I click that and then I click override the output of this field with custom text. Now it looks a little bit intimidating at this point or unclear exactly what you can do. What are your options? Does it use variables? Does it use twig? Does it use PHP? How do you actually access the other fields that you've been using here in Views? Well fortunately, if you scroll down a little bit, there's a section here for replacement patterns. Now you have to expand it, so it's often overlooked. But you expand the replacement patterns and you see, in this case these are tokens that you can insert into the text to use that particular field. So I already inserted these here. I said title by UID. UID is the username of the person who created the content. So if I go ahead and save this, if I save the view, go back to the front page and then I see I have example article by D8Views all in one line with the kind of date created below that. This can be used pretty extensively. Sometimes it can be abused if you don't really know, like if you don't know a lot of what you're doing, but that's okay. I am a big fan of trying things out, making mistakes, learning what you did wrong, and then kind of learning the better ways of doing things. That's the way I learn best. So I encourage you to jump right in, edit views, make changes, save it, go check it out, make another change. It's really the best way to learn views in all the settings that you have at your disposal there. So we're looking at the site. We're kind of clicking around. We have the latest news here, but if you look at this page, it's a little bit redundant, because we have the news page, and then we have latest news on the sidebar, but it's showing the same content. We don't really care about seeing the latest news when we're already on the news page. It's taking about space and unhelpful. So we need to change the settings here to say, okay, well, let's show this block on every other page, except the news page. Let's hide it everywhere else. Show it on the home page, show it on the about page. Do not show it on the news page. So to do this, we're gonna jump right in again. This time, not in views, but in block settings. We're gonna go use the contextual link. We're going to configure the block, which should bring up the page like we saw when we first created or inserted the block, and we're gonna go down to the visibility settings. In this case, we're gonna save pages. We're gonna type in the URL for the particular page that we don't want to show it on, and then we wanna make sure that we select hide for the listed pages. This can be really, really flexible, so if you wanted to show it on any subsection of pages or not show it on those pages, it's just as easy as toggling the option there. So that looks pretty good. I don't think we need to change anything else, so we'll click save block, go back to the site, and we see now that news is taking up a lot more room on the page because there's no sidebar there on the right side, and then it's no longer showing the redundant information. Well, I also created an about page up at the very top. If I click and view the about page, I can see that I do see the latest news. So I tested it out, it's working pretty good. Okay, so now we've created a view with two displays. We've changed visibility settings, we've rewritten the fields. This covers a lot that you might be surprised how much you can do with what you've just learned so far. I'd be a little bit remiss not to talk just briefly about some of the things that are brand new to Drupal 8 though. Specifically, there are some new displays. If you're coming from Drupal 7, and this is pretty exciting for me, there's a new option for REST export. The Drupal 8 version is really good at doing this kind of, you might have heard of headless Drupal or kind of accessing the content that you have on your site without having to actually go to the website. So if you wanna integrate with a mobile app or a API or if you wanna make your website an API, essentially. You can choose REST export in this case and create a list of whatever you want and views and then access it through JSON or XML or whatever you want. It's all built in. You don't have to go and install anything else. It's right there, which is pretty cool. There's also the ability to copy a display as another display type. This is huge. If you, again, if you've used Drupal, if you've used views before, a huge, huge feature request that we've had for a very long time is, okay, I've created the block for latest news. Now what if I wanna create another block that's very similar but different? Maybe I wanna sort the list by, or show it by only a particular author or something that's very similar but has its own unique configuration. You can create a new display, but it's not gonna actually clone the display that you created. It's gonna start over with the, I'm gonna show all blog posts. I'm gonna show a page where 20 of them or 10 of them, a harmony I said. So this is huge. So you can actually create a view like we just did and then you say, okay, well, I want something just like this display I already have, but I wanna show that as a block instead of a page or I wanna show it as an RSS feed instead of a block. It's super easy. You just click the dropdown on the view, you choose which one you wanna duplicate it as and it creates it. This is huge. I don't wanna overstate it, but this is a huge time saver for everyone. But this is really just a drop in the bathtub to keep it the analogy. You can do anything you want with this sort of workflow that we've described here, whether it's events using maybe calendars or upcoming events, slideshows or carousels or things like that. There are still a lot of modules and plugins that integrate with views so that all you have to do is create the view, choose the format or the plugin or whatever that you want to display it as. So for example, if we're creating a slideshow, we would create a new block display and we'd say format, depending on your slideshow, it might be called slideshow or Flexslider or whatever. And then it automatically taps into the fields you're using. So you'd say, I want the big, the header or photo that I took with us, the featured one and the title and maybe a brief, the call out thing and then it just does it for you. You don't have to write code. You don't have to know what the jQuery is really doing, which is, again, super empowering for people who don't know code or they're learning code. They want to see how it works. This is huge. But yeah, the list just keeps going on, on and on and on. You can do any type of content, any sort of feature. Drupal is naturally a content management system and I think views is really what makes it good at regurgitating and formatting and using the content across your website. So regardless of what you want to use it for, what we've talked about today is really just kind of a drop in the bathtub. It's really just a tiny, tiny subset of what we can really do. And I really feel like this is Drupal's competitive advantage. The workflow that I've outlined here can give you access to create most of the content related features that you have in your website. So regardless of if it's a event calendar or a slideshow or the employee staff bios or things like that, it doesn't matter. You create a content, you add fields to the content that make it unique, that make it kind of easy for people to add new content of particular formats and whatever. Once you have that kind of set up, you try adding some content. If possible, you use some real content because that helps make sure that you're actually building something that's useful. And then once you have some content that seems to work and you're not missing any fields, you can jump in and create views, use the preview, change the options until you have what you're looking for. And it's super, super powerful. So we're able to do almost any feature. All the options I gave on the previous page, you could do with this workflow and a few extra modules for fields or for the slideshow, things like that calendar. Almost any feature without any code, which is huge. And the reason is because community. Because people like Earl Miles and Tim Plunkett and a bunch of other people on the Drupal views and core initiative and the views module itself have contributed tons and tons of time to make Drupal what it is, to make views what it is. And it's huge for me, it's a big part of, and Drupal is now a big part of my life because someone introduced me to Drupal and helped kind of mentor me through this process. So I mentioned at the very beginning, I have a real passion for helping people who are learning Drupal to become empowered and kind of get over those roadblocks. Kind of taking it to the next level and being empowered that way. The reason is because someone helped me. Several people helped me really. So I'm now kind of passing it back to you guys. If you feel like you learned something today, as you develop in your Drupal career, don't let it stop there. Don't kind of work in your bubble. Get involved with the community because the community is really the reason why Drupal is what it is today. With that related topic, there is sprinting this Friday, and you might be thinking to yourself, well, I don't know anything about code, I'm a beginner, this is a beginner topic. Why are you asking me to come and sprint? It sounds complicated, it's hard. You, everyone needs to sprint. Everyone needs to come to the sprint. There's a saying, I don't think it's Drupal specific, there's a saying that you don't know what you don't know. A lot of these people that do Drupal, and I've been doing Drupal for almost eight years, I at this point know a lot about Drupal. I am not, it's not possible for me to know what you guys don't know, what piece you're missing, or how our documentation is not sitting with you, how, what did I miss in the slides that didn't, or that caused you to kind of get a hiccup in your process. We don't know it because we already know the tricks to make it work, so we need beginners, we need people who have fresh eyes and fresh minds to jump in and try things out, let us know what's wrong, what can be improved. So even if you don't know code, even if all that you can do is help with some documentation, even if all that you can do is go through a process and see if you get an error, those are all very helpful things to have people help out with at the sprint. So the sprint is this Friday, we do have a first time sprinters workshop, I'll be a mentor there helping out, it's at 9 a.m. so if you need help getting your environment set up locally, if you want to set up Drupal, if you want to learn about patching or using Git, or using the process to contribute on Drupal Core, or not even Drupal Core, but Drupal.org, with modules and things like that, try to make it to the 9 a.m. sprint by 9 a.m. and we'll walk you through the process, we'll have a presentation and help everyone get set up that way. And you will be a huge help. If you come and learn something, it is significant. There are a few other ways to help though, specifically views is new in Drupal 8, it is new in Drupal Core, even if a lot of things haven't changed, a lot of things have changed. So there's the message here on the page, this is basically, this is the help system that was on the, or this documentation was on the help for views before, now it's incorporated in Drupal 8, so it's been migrated or moved into the documentation page on Drupal. And you notice here it says incomplete, this help is missing stuff, there are typos, there are things that have changed that can be corrected. And you should also notice, once you log into the Drupal website, there's that link there, it says you can edit this page too. It can be really, really intimidating to think, okay, I don't know anything about Drupal, I have no right to edit what other people have written. I'd like to try and get rid of that misconception, it's not true, if you notice something that's wrong, like blatantly wrong, or if you feel like the documentation steps are out of place or not clear, you can edit, you can go click edit, it'll create a revision, so everyone's changes will still be saved, people can review what you do, so if you're concerned about making a mistake, it's not a problem, and you can contribute in this way, even if you don't come to the sprint, even if you go home and check out this later, any time you see a page like this in documentation, you can edit it and make Drupal a little bit better. So I do wanna say a quick thank you, again to the views module contributors and the views in Drupal core initiative team, also Joe Fender from Lullabot and Oliver Seldman from Advomatic, they both wrote some great blog posts that helped me kind of get refreshed on what's new in Drupal 8 for views, and lastly, of course you, I'm here to help you guys with this, and there's a little bit you can do to help me too, so the Drupal association uses ratings for these sessions to determine who gets to come back or who gets to present next year. If you felt like this was helpful, or if you have constructive criticism, if you have feedback, I'd love for you guys to just, you can go to the DrupalCon website, on the session page, there's a link at the top to actually give your feedback, it'd be super helpful to just go check that out, leave your feedback, like I said, good or bad, it's helpful for me to improve. Yeah, and so I'll get to take a look at that and improve my slideshow and kind of learn what I can do better, and then also the Drupal association can look at it and see what can be done better next year as well. So with that, I have a couple of minutes, 15 minutes to take some questions, so we have a mic right there, if you could go, the session's being recorded, so if you could line up at the mic, if you have any questions, I'll see what I can do. Sorry, what's your URL? The Sprint one, yep, and that's also on the DrupalCon LA website, so you can go check it out from there. Yeah, that's a really good question, I think part of it is the semantics of, I'm viewing the title, it's kind of the primary purpose, the kind of meta information is the username, so the way I think about it for information architecture is that it makes sense for it to be on the main piece of content, the main thing that you're seeing instead of the other way around. You could do it either way, it should work. Yep, it's huge. It seems like a lot of what we were seeing here is based on a desktop presentation, and I was wondering if there is any, could you speak a little bit to the way that this will be rendered on different devices? Sure, are you talking about the administrative side of creating the view or displaying the content? Right, that's a good question. I think a lot of it comes down to the theming. A lot of the mobile responsive related things are in the theme layer, so it would depend on the theme specifically. You could, however, with the new kind of in Drupal8 thing, you could create multiple displays, or that's not new to Drupal8, but you can create multiple displays of say a block that has slightly different fields to, maybe on mobile you don't want to see the photo previews of the articles or something. Get rid of it, create another one, and then in blocks you could say show this on the front page, don't show it on the front page, whatever. You're welcome. Sure, no, that's a great question, and I think you actually touched on one of the greatest features of what we get with views, and the view versus display architecture, the way that it's set up, is that you can create a view that affects all articles, and then the displays will slightly tweak the results that'll format it or sort it in a different way. So if, for example, it's like, well now, in addition to articles, we also created another content type for press releases, and we want them to show up in the same list. We don't want to have to go to every single display and make the change over and over and over again. We can just go to, in this case, older versions of views called it like a mass cure display, or it's kind of the one that affects all of them. You can go, you can click edit, you can change it to say, okay, include not just a filter to show only articles and press releases, and then all of the displays are immediately updated to reflect that change. The difference between the clone, if you create a clone of one, let's say a block, and then you create a clone of it, it's kind of assumed that you're going to be making some sort of changes to it. So you would say a block already has 99% of what you need, but you also need an additional field. Maybe you want to show it on the author page instead of the about us page. If it's almost there, or it's all done in older versions, you would basically have to create a new view that inherits all of the default values, and then make all those changes all over again before you can then kind of keep making changes. This allows you to say, this is almost exactly what I want. Let's clone it, and then make whatever little changes I need to make it unique. Right, but they're disconnected at that point. No, just the display. Let me change your example slightly. So maybe instead, in one example, you show three pieces of content, and then you want to show another one that shows four instead. So what you would do is you would go to the view, you'd go to the display that is almost already done, you clone it, and then you'd say overwrite, change this to four instead of three, and then that would make them distinct. You'd still have everything else that was original from that one, but moved over and then that one changed different. Right, so that would be, let me jump back real quick, that would actually be different displays on the same view, because if you're wanting to fundamentally show the same content, but just format it differently, or with different criteria, then you'd create displays of that one view. So in this case, we have the news view with a page, a feed, and a block. Those are fundamentally the same pieces of content just shown in drastically different ways. If you created, in this case, if you cloned, if you duplicated this block to make another block that shows five, or six instead of five, all you'd have to do is go duplicate block. A new display would appear next to here. You could give a unique display name to show, it's like latest articles with six, or whatever you want to call it, it's not important. And then you go down here and you'd say, instead of five, six, and that change would be saved in the particular display that you just created from the clone. Yes. It depends, I think. It depends how you're defining query. If you're saying technically the actual query that was written to get this information, I would assume probably not. It is possible, by the way, just to, you can display the query that views generates if you're technical and want to see what it's doing. There's a setting in views to actually show that at the bottom above the preview, so you can see what it's doing, debug performance stuff. Yeah, that's a good question too. So in, I talked about the master display. The way that this was adapted in Drupal 7, and then now carried over in Drupal 8, is that when you add, or when you make a change to a setting, you have the option of saying, does this affect all of them, all of the displays, or is this unique to just this particular display? So when I went back and, yeah, so see right here, when I edited the authored on field, at the very top, it assumed already I wanted to override it, but I have the option of saying all, or I forget what the specific terminology is, but you can say this should affect all displays that are not already overwritten. To be honest, I don't know if this is the default for when you create a new display, or if it's just I check the box for block, and it assumed that was different. Yes. No, it's a very good point too, I agree. It's a mistake that I still make today. I get excited with my configuration, I just click save, and then, oh look, all my displays are different. Fortunately, it's fairly easy to set it back how it was, but it still is pretty annoying. Yep, so let me run through these really quickly. Attachment basically attaches itself to another view. So if you wanted to show the one featured article at the very top of all of the other articles, you could say here is the list of all the articles offset by one, so it doesn't show the first one or something, and then you say attachment, this is a featured one that maybe has a little bit more information, or a larger photo, or something like that, and then when you show the page, it'll actually show that at the top, so it's attached to another view at the top or bottom. Yes, so whenever you create a display, all display-related settings are right in this middle section right here, so these are all the block-specific settings, things that are relevant for blocks. The page one is all the stuff that's relevant for pages, so we have like the URL, the menu, things like that, so each display will have its own set of settings that are right there in the middle. And really quickly, let me step through some of those other options. So block, we already talked about blocks. Embed, I'm not 100% sure. I tried reading documentation and finding exactly what's gonna be used for. My interpretation of what I've found so far is that the embed is that you can actually embed the view in your content. That's a feature that's been asked for a lot, super helpful if that is the case. If someone knows, does anyone know for sure what the embed display is used for? It's brand new to Drupal 8, so I haven't used it before. Okay, so I couldn't find the documentation. If you find out and you wanna go update the documentation, that would be super helpful. Entity reference, actually that's another one. I haven't had a chance to use entity reference field in Drupal 8 yet, or the display yet. But I know in previous versions of Drupal, it was complicated to show, say for example, this content is related to another piece of content. How do you show the other piece of content on this content? It was complicated, there's relationships, it got confusing. I'm hoping this optimizes that in some way, but again, the documentation was a little lacking, so I couldn't find information about it. Feed, RSS feed, XML feed, things like that, page, self-explanatory, and then rest, I mentioned that a little bit. You can basically say, here's my JSON, here's where people can access the content on my site through JSON or another restful service. Yeah, it's a different way of displaying a feed, sort of. Yeah. Thank you so much. Yeah, you're welcome. I think so, I would hope so. I don't believe so. Everything that I saw, and again, this is one that I haven't had a chance to jump into in use, but everything that I saw about the REST export was that it's kind of like the feed in that it'll give you, it'll generate a URL for you that you can access to, pass arguments to, and you'll get the content back. I know. I couldn't agree more. There's a lot of people. Thank you, and it is officially the time, unfortunately, I have to step down. But if you have any more questions, I'll be around here packing up. Please come on up, and thank you all very much. Also, my slides are available on the session page for this session. They're at the very, very top. You can click and view them. It's the same Google slides. It's also the bit.ly. I'll leave it up on the page until, I don't know, for a little bit.