Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Our horizontal navigation is looking great but if you go to the PRODUCTS page, you'll see that our secondary navigation now leaves something to be desired. What's happening here is PRODUCTS is our selected item on the navigation bar and then it's putting all of our secondary navigation in a horizontal manner as well, followed by the rest of that primary navigation bar. What do we need to do now is separate these so that the secondary navigation stands alone on the left side of the page. When we are done, the page will look like this.
So the first thing that we need to do is we need to split this main navigation bar into a bar that'll go across the top of the page only and the secondary navigation, that will live on the left side of this page. You might think an easier way to approach this is to simply create another navigation bar for the secondary navigation for this page. The problem is as you go further into the site the breadcrumb, which is here above the word Products, will not work correctly. In that case, instead of saying, Home> Products>Hot Chocolate, it would simply say Home>Hot Chocolate and not really reflect the correct navigation path for the website. So let's go into the backend of the website, we're going to go to Extensions > Module Manager, and we're going to make a copy of our Main Menu.
We're going to put a check mark next to Main Menu and click the Copy button. In our copy of Main Menu, we're going to change some of the settings. Instead of it being, Copy of Main Menu, I am going to make this the Products Menu. So I will know what this is and I am going to enable it, although I won't show the title. I would like this to appear on the left side of the page. I would also like it to appear only on certain web pages, specifically those related to the products. So I am going to switch to Select Menu Item(s) from the List, select Products and that entire section. I am holding down the Shift key to select multiple items at once. Over on the right side of the page, we have a Start and an End Level. These are critical settings for putting together the menu. If I start at 0 and end at 0, this will give me the full menu; but what I really want is just the secondary navigation associated with the Products section.
So I am going to start at level 1 and end at level 0, meaning that I want everything that's not the primary navigation to show up on the left side of the page. So let's hit Save and let's see what happens. Now you'll see the navigation bar has, in fact, showed up on to the left side of the page. However, we still have the problem with our main navigation bar. That's because we need to change those Start and End settings inside of the Main Menu module.
Back to the backend of the website, go to Main Menu, our Start Level will be 0 but our End Level will be 1. In other words, show only the primary navigation for the Main Menu. Click Save. Now let's go back to the front and click Refresh. So our main navigation bar looks exactly the way it did on Home page and we have our left navigation in place, on the left side of the page. Now we need to add a little bit of style to that left navigation.
Once again, we will go to CSS > Edit CSS, and switch to the default style sheet, scroll down to the left module styles area. First of all, we need to get rid of the bullets. So in the left div for ul, once again, we go and set our list-style-type to none. Now we can just style the links that are left. I like the padding that's there. Notice how nicely it lines up with 'H' in Home. So I don't really need to turn off the margin or the padding associated with this list.
So now we'll style the actual links themselves. So for the links located in an unordered list, in both the unvisited and visited states, I would like them to be of certain color. This is a teal color. I would like to get rid of that underline, by setting the text- decoration to none and I would like them to be bold. We can also set a hover state. I've set that to white. Now when we hover over the links, they'll also change color.
Finally, we may want to add that "you are here" type of feature that we have on our top navigation, under Products. So if I am on one of these pages, such as the Product Sampler or the Hot Chocolate page, I would like to see those words appear white. I am going to put that right above my hover because again, remember that your link styles must be in the order of link, visited, hover, and active. Once again, we're going to work with the active state of the li, just like we did on the previous menu. What we need to do is set the color to white. We're not going to see the active state in our left navigation on this particular page because there is no link corresponding to this page in the left navigation, but once we transfer this code to our Joomla! template, we'll take a look again at one of the other pages and make sure that this code is working correctly.
So once again, I am going to click Ctrl +A or Command+A, Ctrl+C or Command+C. Then go back to the backend of the website, go to Extensions > Template Manager, inside, Edit, Edit CSS, default.css, Edit, and then once again Ctrl+A or Command+A, Ctrl+V or Command+V and save. Back to the front and on to the website and Refresh, and that's looking much better. Our hover is working great and when I go to the Product Sampler page, you see that the link here, on the left hand side, is white. PRODUCTS in the top navigation is brown, indicating where we are in the hierarchy.
Now we're going to take a look at the Hot Chocolate page. Hot Chocolate has some tertiary navigation and it looks a little bit off to me. We're not on all four of these pages at the same time. I really only want to be on the Hot Chocolate page or the Caramel Chocolate page. So we're going to need to adjust this navigation a little bit more, which we'll do in the next few movies.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 105324 Viewers
56 Video lessons · 117066 Viewers
71 Video lessons · 86276 Viewers
131 Video lessons · 41236 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.