Joomla Blog

Tutorials, reviews, case studies and other tips to help website owners and website developers master the Joomla content management system.

Joomla Hidden Menus

Posted by on in Tutorial
  • Font size: Larger Smaller
  • Hits: 6808
  • 12 Comments
  • Subscribe to this entry
  • Print

There are several reasons why using a content management system is better than a static website. You don't need any local software, so updates can be made from any Internet connected computer or mobile device. Multiple people can make changes. And if a change needs to be made to multiple pages, this is usually easier and faster with a CMS. There are downsides too and in this article, you'll discover the challenge of implementing a hidden page on a Joomla website.

What's a hidden page?

There are occasions when you need to create a page to tie in with some sort of functionality. For example, you might have a feedback form that when submitted, redirects to a "thank you" page. Or perhaps you have some sort of third-party payment system that redirects the customer back to a particular page on your site after a successful transaction. These confirmation pages should only appear as part of the related process, so you don't want a link to them in a menu. Obtaining the appropriate link might seem easy, but getting the page to look the way you want it to isn't so obvious. Let's go through the entire process.

1. Create a new category - You don't want confirmation pages mixed in with your regular articles. So create a specific category and in this case I will call it hidden.

2. Create the confirmation article as you would any other article and store it in the category you created in the first step.

3. Create a new Menu by going to Menus - Menu Manager - Add New Menu. Give it a title and a name. There is no need to create an associated menu module because you don't want the the links in this menu to appear on the website.

4. Create a new menu item in the new menu. You'll most likely want to use the Single Article option. And then select the article that was created in step 2. Now there are two pieces of information to collect from this page. The first is the Link field which shows:
index.php?option=com_content&view=article
That's the first part of the URL that will point to this article. Save this article and then note that this changes and its too long to read. Click the cursor within this box and select everything. This can be a bit tricky with the mouse so use CTRL+A on Windows or Command+A on a Mac. Then copy. That's CTRL+C or Command+C. Now I'll come back to this, but while we're here, also make a note of the number next to ID which might be something like 538.

b2ap3_thumbnail_25-07-2012_hidden-page-2_20120725-044616_1.png

5. Go to the frontend home page and paste the URL after the domain name. It should look something like:

www.yourdomainname.com/index.php?option=com_content&view=article&id=13

This is the confirmation page and at first glance it looks okay. But note that the word Articles appears at the top. And how do you control which modules appear on this page? These challenges occur because Joomla doesn't recognise this page. Pages are created by menu items and although we specified the article ID number, Joomla also needs to know about the menu. And that's where the second piece of information is needed.

6. Add the menu ID number to the end of the URL. If you didn't note this in step 4, go back to the appropriate menu page and look for it in the last column labelled ID. Then add this to the end of the URL:

&Itemid=XXX

where XXX is the ID code.

For example the full url might become:

index.php?option=com_content&view=article&id=13&Itemid=538

where id=13 is the article ID number and Itemid=538 is the menu ID number. Note that the first I in Itemid must be a capital I.

Now the word Articles has disappeared and you can manipulate modules on this page as you please. Let's remove the Users Latest module. Go to Module Manager, find the module and choose the option to display the module on all pages except the one specified. And check the hidden page so the module doesn't display on this page. Refresh the frontend to see that the module has been removed. You might be tempted to just try this last step without bothering to add the menuid, but it doesn't work. If I load the page with the menu id in the URL, the module returns. Once again, this is because we haven't told Joomla about our desired menu, so it doesn't know which modules to display.

One last thing to mention. These are of course Joomla's native URL's as opposed to search engine friendly URL's. That's not an issue because you don't want these pages indexed by search engines anyway. They're purely to be used to paste into the relevant field within whatever extension or off-site application you're using. In fact, it's a good idea to hide these pages from search engines by going back to the menu item and look at Metadata - Robots and change the setting to one of the Noindex options. In theory robots shouldn't find these pages because they don't exist in a menu. But if you are using a sitemap extension, the URL might get added without your knowledge. If a search engine happens to find the page, it will not index it if you enable this setting.

Rate this blog entry:

Comments

  • Douglas W McNeil
    Douglas W McNeil Thursday, 26 July 2012

    Richard,

    This seems like a convoluted way of accomplishing that task. What is the advantage to doing it this way? I solved this problem by creating an article, creating a menu, creating a module, assigning the menu to the module but not assigning the module a position on any of the pages. I also made it so the menu does not appear on any pages ( I unchecked all of the blocks at the bottom of the module page). This way, I can still get to the page, but I do not have to go through all of the article ID information like you show in your video.

  • Richard Pearce
    Richard Pearce Thursday, 26 July 2012

    How do you "get to the page"? You need to know the URL. And the URL needs to include the Itemid, otherwise Joomla doesn't know which modules to include. I can see how at first glance this might seem convoluted, but it is the easiest way to get the page behaving as you desire.

  • Douglas W McNeil
    Douglas W McNeil Sunday, 29 July 2012

    Sorry Richard,

    I guess I left out one part. I am using Fox Contact which just has a drop down menu for the article I want to use. There is no need to retrieve the article ID or menu item this way. I guess that is what was confusing, but anyway, it works for me. Is there any down side you can think of to have a module for a menu that does not appear on any pages and the module is not assigned to any pages?

    Thanks
    Doug

  • Richard Pearce
    Richard Pearce Monday, 30 July 2012

    There is no downside, but it might not work. There is a second advantage of understanding this principle. I left this out of this tutorial as it could confuse things, But this approach allows you to construct a URL that mirrors an existing menuid. Let's say you're creating multiple landing pages for an advertising campaign. You could create one page and get the modules assigned as you wish. Each subsequent page can use the same menuid. Then if you need to change a module on the "master" landing page, this is reflected through the other pages automatically. Hope that makes sense.

  • Greg
    Greg Thursday, 26 July 2012

    Richard, Great video on hidden content. Does this apply to creating a landing page for some permission marketing content? I am looking to build a landing page that will be linked from my within my website and from the outside. Do you have any recommendations for building a landing page?

    Greg

  • Richard Pearce
    Richard Pearce Thursday, 26 July 2012

    Greg if it is linked from within your website then no, you wouldn't need to do this. You would have a normal page and could assign modules accordingly.

    But if you want to create a landing page that is inaccessible via a menu, then yes this method is perfect. How do you create a landing page? It's just like any page. Create one or more articles. Create a hidden menu as described here linking to either a single article or I guess it's feasible the landing page might be a category blog layout. Then create module for the landing page if necessary and assign them to the hidden menu item.

  • JP Fourie
    JP Fourie Thursday, 26 July 2012

    Richard, I am astounded. Fantastic tutorial just as I need exactly this!
    Thank you very much, and enjoy the rest of your day.
    JP B-)))))

    Reply Cancel
  • Guest
    Ivan Gjødvad Friday, 16 November 2012

    Hi Richard.

    Great tutorial i followed it but the name articles is still on my page, i dont know why. I followed the guid step by step.

    do you know whats wrong?

    regards.
    IVGJ.

  • Richard Pearce
    Richard Pearce Friday, 16 November 2012

    No - it works for us. The other workaround is to change the language string from "Articles" to nothing. This is a little hard to explain, but this post might help: http://www.buildajoomlawebsite.com/blog/tutorial/language-overrides-from-administrator

  • Tristan Montano
    Tristan Montano Saturday, 9 March 2013

    Both solutions you have on here are superb! I've struggled with this issues for days and tried different avenues to hiding articles on hidden menus, and both the &Iditem as well as the language overrides work like charms.

  • Blake Burroughs
    Blake Burroughs Thursday, 16 May 2013

    Richard-- Loving it. Next website for you-- How to Create a Successful Adwords Campaign...I'm just sayin' :D

    Any suggested resources?

  • Richard Pearce
    Richard Pearce Thursday, 16 May 2013

    I have no plans at this stage to tackle the intricacies of AdWords. The main thing to consider though is starting with exact match keywords and then if that is profitable, move to other options. https://support.google.com/adwords/answer/2497836

Leave your comment

Guest Friday, 24 May 2013