Join Jen Kramer for an in-depth discussion in this video "Hidden" menus: Linking to an article that's not on a menu, part of Joomla! 3 Essential Training: 1 Working with Content.
- So, we've talked about menus. All kinds of menus. We've talked about blogs and lists. We've talked about making new menus. We've talked about making drop downs. What if we want to link form one article that's on a menu to one article that's not on a menu. In other words, you wanna have some kind of article for your website that actually doesn't appear in the site's navigation but you'd like to link to it maybe from one place on one page somewhere. How would you go about doing that? Well, this is a technique called hidden menus that we use here in Joomla.
I'm gonna use an example the dining portion of the website. So, first of all, I need to set up a dining link 'cause I don't have one over yet. So, let's go to Menus, Main Menu, and I'm gonna make a new link and that link is gonna be called Dining and the menu item type is gonna be an article, just a single article. And which article is it gonna be? It's going to be, let's see here, the dining category, the Landon Rooftop Cafe, and that's gonna go at the top level of the website.
So, let's go on ahead and say Save and Close and if we refresh the homepage of the website here we get our Dining link and there's the talk about dining. Now, of course, the Landon Hotel wants you to go to the rooftop cafe for every meal, but oh, by the way, there's also some places you can dine in other locations. They don't wanna feature this but they do want to you not be turned off and think this is the only place in the entire West End that there is for you to eat.
So, what I'd like to do here is I'd like to make a link to the dining in the area article that we already have created from within the Landon Rooftop cafe here and link off to that article for dining in the area even though the dining in the area article itself does not appear anywhere on this website. How can we go about doing that? Okay, so here's what we're going to do. This is pretty sneaky. We're going to go to Menus, Menu Manager, and we're gonna make one more menu.
We'll go ahead and hit the New button and I'm gonna call this Hidden Menu - Do Not Delete. The reason why is because it may not be obvious that this particular menu has any purpose or why is existing so I like to add the Do Not Delete as a note so that somebody doesn't come along and say, "Why is this here? "What is this doing?" And get rid of it. The menu type will be hidden menu and the description can be Do Not Delete.
We'll say it a couple times just in case. Go ahead and say Save and Close. All right, then what we're going to do is we'll add a link to the hidden menu. So, under Menus, Hidden Menu, we'll go ahead and add a link. Go ahead and say New, and I'm gonna say Dining in the Area will be our menu title and the menu item type once again's gonna be a single article and which article is that gonna be? It's gonna be Dining in the Area.
And it can be at the root level here as well. Go on ahead and say Save and Close. Okay, so, what makes this a hidden menu? Well, if you go back to Menus, Menu Manager, notice that there's no module that exists for the hidden menu. We have a menu. There's a bunch of links on it but there's no module to display those links on the website thus the hidden in the hidden menu. Okay, so now that we've got that in place let's go back to Content, Article Manager, and let's go to the Landon Rooftop Cafe article, and from here we'll go ahead and add an extra sentence.
Of course, there is plenty of dining in the area. Okay, I'm just gonna go ahead and add that extra sentence here and, of course, dining in the area is the text that I would like to link to the dining in the area article so, I'm going to highlight that and then down at the bottom here I'm gonna click on the link for article and I'm going to link to the dining in the area article, clicking on that, and you may need to go back and edit the D and the A here, and it looks like that D might not be a link anymore.
Let me just fix that little problem. There we go. Make sure all the words appear inside the link. There we go. And then go ahead and say Save and Close. All right, so now when I refresh this web page here's that extra sentence with the link to Dining in the Area. And I can go ahead and click this link and I get my article about Dining in the Area. The key here is that in order for me to link to the article the article itself has to be under Menu.
Remember the CAM? Categories, Articles, and Menus. But we just didn't want that particular menu item to display anywhere. So, the hidden menu technique gets around that requirement in Joomla that every item that you want to display on your website has to be linked to a menu by linking it to a menu that is itself not displayed on the website.
Note: For installation and setup instructions, see the course Installing and Running Joomla! 3: Local and Web-Hosted Sites.
- Touring the Joomla! interface
- Creating and editing categories
- Adding links and images to articles
- Creating basic menus
- Adding version control and keywords
- Configuring category lists
- Creating a dropdown menu
- Changing display settings