Drupal 8 Basics #10 - Blocks Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up this is Scott with level up tutorials and in this video we'll be explaining the concept of blocks in Drupal now blocks are a big part of how you manage your content on the site and how you move things around so there's a lot to learn about how you use and move around blocks it's a very powerful thing so we're going to take a couple of videos and talk about blocks so to understand Drupal and how it differs from other content management systems it's important to really understand the block system now as an administrator if you hover over some of these sections and we click this you'll see a lot of configure block and now that might be confusing if you've never used Drupal or maybe don't know necessarily what a block is now if we were to think about this layout you can see that when we hover over the pencil we get an outline around something and that little grouping of code is a block for instance we hover over this you can see that it's an M menu but it's also a block this header this logo area is a block this search section is a block and you can think of a block as any grouping of content and you'll notice that going throughout your site you'll find lots of blocks everywhere so to start let's get rid of this powered by Drupal so we could do that simply by coming to this pencil and clicking configure block now what this is going to do is take us to the block configuration page now some of these may be very different you'll see in a minute that when we look at the header block there's some options there and we have some options here such as display the title which is unchecked so if we were to check display title save the block now when we come down here you can see that it says powered by Drupal twice because this is the title of the block and this is the content of the block let's go ahead and come back to configure block here now there's a lot you can do in here for instance you can restrict this to particular content types you can restrict it to specific pages of which using a pattern which will have to go over in another video and you can restrict it to roles let's say for instance you have a website that only shows ads to anonymous users you might have a block that has an ad and you would just check only show to anonymous users now in addition we have region now the region is the area of the site where this block is displayed you'll notice we have footer 1st 2nd 3rd 4th 5th featured sidebar content breadcrumb header all sorts of stuff now this list is going to be different based on what theme you have your theme is going to be able to provide the regions that these blocks are placed in that makes it so that Drupal system is endlessly flexible you can swap out themes move your blocks to a new region and still have them show up correctly let's actually head to structure now and let's come to block layout you'll note from block layout we'll see a big long list of all of our blocks it's going to be from top of the page down so you'll notice we have header or primary menu and if we keep scrolling down you'll see we have footer 5th for instance we have this powered by Drupal block that we just saw and it's in footer fifth let's say we don't want this block to show up at all well we can actually move it to none now if it's in the none position it's not going to show up anywhere and we can just click Save now after saving let's scroll down here once more and you'll see in footer 5th we no longer have powered by Drupal but just footer menu and then disabled we have powered by Drupal if we head to the front of our site you'll notice that that block no longer shows up in addition let's see we have the search bar here and the tools right here let's say we want the tools to be first let's actually head to structure block layout once more and from here we can scroll down to what would be the sidebar so side-by first has search and tools now we want those to swap so let's click and drag this and move a tools above search now you'll notice it has an asterisk next to it which essentially means that there are unsaved changes so we have to come to the bottom of the page and now click save blocks for this to take effect if we come back to our site and you'll see that tools is now above search so working with blocks in Drupal is really intuitive and it's a really nice system if you're coming from other content management systems it might not be what you're used to but you will get used to blocks very quickly now blocks can contain all sorts of stuff it can contain as you see a search functionality can contain a menu it can contain at just basic blocks of text it can contain a logo you'll notice it can contain a menu up here and we're gonna get into all of those different types of blocks in the next few videos so as always this is Skyway level up tutorial so if you have any questions or comments leave become in the video help me up at Twitter or Facebook I level up tutorials I love to hear from you if you want to purchase the rest of these videos before they're available on youtube head to store that level of tutorials calm or sign up to be a LevelUp pro thanks for watching and I'll see you in the next one bye
Info
Channel: LevelUpTuts
Views: 23,999
Rating: 4.8809524 out of 5
Keywords: drupal, html, web developer, tutorial, css, javascript (programming language), drupal7, development, how to, drupal (software), series, drupal 8, modules, drupal8, composer, develop, developer, theming, tutorials, drupal video, drupal tutorial, web, web development (interest), website, web development, tuts, drupal theming, web application (industry), web application development (industry), web development (project), web developer (job title)
Id: YDF6hIBLyYY
Channel Id: undefined
Length: 5min 44sec (344 seconds)
Published: Wed Apr 06 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.