Close

I want my module on this page!

Here’s a common question.

“I want to put module X on page Y. How do I target that page in the module manager?”

Well you can’t actually target a page as such. The Joomla module manager works by using the itemId at the end of the URL. The itemId is based on the menu item that was clicked by the user. This goes way back to the days when Joomla navigation was meant to be via menus rather than people clicking on links within modules and components. What you can do is create a menu item pointing to the page in question and enable the module for that menu item.

Don’t want a menu item for that page? No problem, the menu doesn’t need to be visible. A very common trick is to create a menu item to your page (or component) in an unpublished menu. You can still target this in the module manager to have the appropriate modules displayed on that screen (or component).

Step by step instructions in the post

Example 1. I want to add a custom html module to the right column of a page called page with Map but I don’t want it to appear on other pages. I don’t mind have a public link to the article.

1 Go to the Menu Manager
2 Select a Menu to add this item to, e.g. Main Menu
Adding a Module to a Page
3 Click on New
Adding a Module to a Page
Click on Articles
Click on Article Layout
Adding a Module to a Page
4 Choose a name for the menu and select the Article
5 Click Save and you will be returned to the menu list with your newly added item added in the appropriate 6 location (at the end of the list if you did not select a “parent”)
7 Now go to Extensions | Module Manager
8 Click New
9 Select Custom HTML
Adding a Module to a Page
10 Enter a title for the module and select the menu item you just created. Also type something into the html area at the bottom so the module has something to display.
Adding a Module to a Page

11 Click Save
12 Go to the frontend of the website and see if it works. Click on the newly added menu item and you should see your module appearing on the right hand side.

 

Adding a Module to a Page

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.