One of the questions I keep running into – and by running into, I mean keep having trouble with – is that every component in Joomla! requires a menu item to be useable. While that’s not always a problem, I often scratched my head when our designer wanted to use fancy modules and images to replace the menu.
But today, I found what might be the obvious solution. I present you: the Invisible Menu!
How it’s done
You already heard one of the possible scenarios in which a menu item seems to be unavoidable. I’m sure you can think of some of your own. So, let’s take a look at this “quick and dirty trick” I discovered today. For this example, let’s assume that I want to link to ALFcontact, a contact component we use regularly.
- Create a new menu. (Menus > Menu Manager > New)
- Go to Extensions > Module Manager and open your brand new menu. Make sure to publish the menu.
- Don’t save quite yet! Under Details, go to “Position”. Instead of choosing one of the regular positions, click in the box, and type the following: invisible. You’ve now created a so-called user position. Normally you’d use this to display a module in an article. Well, we’re not going to. We wanted the menu to be invisible, remember?
- Go to Menu, and open your new menu. Create a new menu item like you normally would for the component.
- Create your module, article or whatever it is you want to link from. Create a link, and using the JCE editor, create a link for the menu item in the invisible menu.
- You’ve now created a link to ALFComponent (or the component of your choice) and no menu-item is to be seen. How’s that for being a Joomla! Ninja?
Super solution! Since my template has an image in de right lower corner that overlaps the main container, sometimes the component gets overlapped too. Just some extra lines could help in this case.
I’m using the ‘Component as Content’ plugin (it’s in the JED). I also had to create an extra menu item in order to get the component working. However, I didn’t want my visitors to get directly to the component but I wanted to show them the component within an article so that the component would come up more ‘nicely’. I thought it was impossible until I ran into this solution. Works perfect, thanks!
Glad to see it work out! Sometimes, you got to think outside the box when using Joomla! 🙂
great idea, I have been using invisible menus in an other way by creating them and then unpublishing the module this works the same i think
I always create a “hidden menu” and use it for all content that I don’t want to show in menus on the website.