Drupal 8 Basics #14 - Adding The Menu To Our Pages

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up this is Scott with level up tutorials and in the last video we created our menu and in this video we're gonna show you how you can add it to our page as a block and it's gonna function the same way as any other block but there's a lot of extra little options that come with the menu block so let's look going on that right now so we now have our new menu created let's head to structure analyst head to block layout now that we're in block layouts what we want to be looking for is our sidebar navigation chances are you'll find it under none and what we want to be looking for is our sidebar navigation now you'll see main navigation breadcrumbs primary admin actions but what we're not going to be seeing necessarily is that menu that we just created so we could come here to our blocks and you might look for our side navigation and we could look all over but you're not going to find it that's because we need to place the block first so to place the block let's come to secondary menu here so to figure out where we want to place this you'll see all these different block regions we have the content the breadcrumb feature top and once we have sidebar first this is most likely where we'll want to place this however if we scroll to the top where you could say demonstrate block regions it's going to show us our page and it's going to show us where exactly all of the regions are so for instance we want sidebar first so let's go ahead and put this in sidebar first let's head back here and let's scroll down to sidebar first and let's click place block now let's go ahead here and let's come down and well we could look for it and here it is or you could type in side nav here and have it filter for you so now that we have this filter we can click place block this is going to give us our block screen which we may have seen before now the menu levels is interesting because in this drop-down we have access to start at an initial menu level for instance if you wanted to start at the child level you could set this to be 2 and then we won't ever see that initial link and we would only see the child link if we set this to 1 it's only going to be showing it's going to be showing the parent and child likewise we have this drop down this is how many levels do you want to display you could have a menu that is maybe 6 levels deep of just a different nesting of different levels of content right and you don't necessarily want all 6 of those to show up in your menu that would look outrageous and and you really maybe once you get into that page you have another menu that shows the next couple of layers deep well this is where you change that setting right now it's set to unlimited but for this example since even though we only have 2 layers I'm going to set it to 2 because that's all I wanted to display now we want this to be able to be seen on non restricted content types and unrestricted pages and by non restricted rolls basically we want this to be seen by everyone on every page if you want to restrict what types of content it is or what pages in particular or even what roles you can head back to the conditionally display blocks video to have a more understanding about the visibility for blocks you can see we can even have it to display the title or not display the title I'm going to have this side nav title actually be something different so the back end name of this is going to be side nav but let's actually have this displayed as related posts ok and let's click save block now we have our related posts let's head it back to the front end of our site and you can see we have related posts and we have this little caret to let us know that first post is a child of recent post if we click this it's gonna take you to that individual post you'll notice that the current link that we're on is actually changed to black now this is going to depend greatly on what theme you're using this is the built-in Bartik theme I'm going to show you how you can install other themes on your Drupal 8 site in future videos here and in advance tutorials I'm going to show you how you can even create your own theme however that's for another time so we've now created a menu we've added it to our blocks but maybe I'm not happy with its placement I want this to be at the top so let's head back to our block layout let's grab related posts and let's drag it all the way to the top here so now it's going to be above tools and above search we can click save blocks head back to our page and when we refresh you'll see related posts is at the top of the page perfect this is just how we want it and if we ever need to get back in here we can click the edit button here configure block configure menu item so we now have a new menu we have a new menu block and we have it in our sidebar as always this is Scott with level up tutorials if you have any questions or comments they come in the video I mean about Twitter or Facebook if you want to purchase the rest of these videos before they're released on youtube head to stored elavil up tutorials calm and you can purchase these for download there in addition you could also subscribe to be a level of pro and get early access to streaming in these videos and be aware there's going to be a new next level views premium tutorial series available for those who want to get into advanced and views theming as always thanks for watching and I'll see the next one bye
Info
Channel: LevelUpTuts
Views: 17,145
Rating: 4.8775511 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: PwceqEKUxHQ
Channel Id: undefined
Length: 5min 41sec (341 seconds)
Published: Wed Apr 27 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.