One case where this is true is when you are linking to articles from another article. For example, you may have articles in your site that will not have specific menu items associated with them. Instead, you may be linking to these articles from other articles. In this case, you will not have a way to assign modules to individual articles.
You can still control which modules display on which articles by manually setting the Itemid portion of the link URL. Say, for example, that you will have five different "page types" that will display, depending on the article. Each "page type" will have its own combination of displayed modules. Here is how you can set this up:
- Create a menu called "hidden" and add a menu item for each of the five "page types." The menu item type will be an Article Layout.
- Assign the desired modules to each of these menu items in the normal way.
- Do not create a "mod_mainmenu" module for the hidden menu. This menu will never be shown on your site, so no menu module is needed.
- Note the ID numbers of each of these five menu items. The ID number is shown in the Menu Item Manager screen.
- Create the link to the article, using one of the following:
- Create the link manually by copying a normal Joomla link that is in the format: index.php?option=com_content&view=article&id=xx&Itemid=yy, where xx is the ID of the desired article (from the Article Manager) and yy is the ID of the desired menu item "page type" (from the Menu Item Manager).
- Use an extension such as the JCE editor to create the link from the editor. Link to the desired article and manually add "&Itemid=yy" to the link, again where yy is the ID of the desired menu item "page type."
- Any SEF component, such as sh404SEF or JoomSEF, that allows you to create custom URL's will work as well. When you create the menu item for one of the 5 "page types" that is linked to an arbitrary article (consider a dummy article), simply copy the non-SEF URL from that menu item creation page. It is referred to as the "Link." Then in your SEF component, create a custom SEF URL with that link you just copied, only edit the &id=xx where xx is your desired articles id number and add the &Itemid=yy where yy is the ItemID from your custom "page type." If it doesn't work, make sure you assigned the modules to your custom "page type" in the the module manager.
When these links are displayed, the modules assigned to the Menu Item corresponding to the Itemid=yy will display along with the Article corresponding to the id=xx. Note that you can still use the Joomla SEF URL option. In this case, the URL will be converted to the SEF format, but the correct Itemid will still be used.
Posted in: Joomla