8

I have asigned a module to pages according to their menu items in the module parameters but I would like to hide/show it on specific pages that don't have a menu item linking to them.

How do I control module display on these pages?

6 Answers 6

20

Solution 1 : hidden menu

If your pages also need pretty sef urls, you can make a hidden menu and link those articles in the hidden menu. A hidden menu means that you don't create a module for it, you just create it in the menu manager, so it's never visible as a true menu to the end user.

Since Joomla sees this as a real menu (even though it's not visible), you will be able to assign modules to each one of them by selecting the hidden menu items in the module parameters.

UPDATE: Since Joomla 3.5 you can now choose to hide menu items in a published menu by going to the Link Type tab in the menu item and changing "Display in Menu" to "No".

Solution 2 : advanced module manager

Other than that, Regular Labs (previousl called NoNumber) Advanced Module Manager is absolutely the way to go. Advanced Module manger lets you assign modules based on a large number of criteria such as category, component, url, menu item, language. You can even use it to publish things to specific users or groups of users.

6
  • 1
    This answer gets the upvote because it mentions both Advance Module Manager and hidden menu items. Both are important tools for Joomla. Apr 23, 2014 at 3:27
  • Someone edited my post (for the better!) and I tweaked the edit. I'm not sure how it works yet so I don't know how to give credit to the editor :)
    – Brian Peat
    Apr 23, 2014 at 13:48
  • @BrianPeat I edited your post, you can see the edit history by clicking on the "edited *" left of your name at the bottom of your post.
    – web-tiki
    Apr 25, 2014 at 8:03
  • Ah, thanks for that. Learn something new every day here :)
    – Brian Peat
    Apr 25, 2014 at 13:50
  • Advanced Module manager Free version was great! nonumber.nl/extensions/advancedmodulemanager Thanks!
    – Max
    Feb 7, 2016 at 19:16
8

You can't do it with default Joomla. Only by menu item. Take a look at advanced module manager by RegularLabs which gives you more assignment options.

1
  • 1
    This. Double this. Go get it and never look back.
    – Brian Peat
    Apr 22, 2014 at 19:50
4

To get around issues like this, I normally create a 'hidden' menu which is not placed anywhere on the site. By doing so, I can specify the URL of specific pages and can apply modules to them (as you are trying to do) as well as templates.

3

Try using No Number extensions.

http://www.nonumber.nl/extensions/advancedmodulemanager

The advanced module manager allows you to do a lot of specific assignments, so you could actually set it up to match a menu item only if "abc" is in the url path, or by specific article, or component, even day of the week. You can even write custom php functions to create your own selectors. You can use "any" or "all" matches, it's pretty awesome. All his other extensions are pretty great too, totally worth purchasing Pro, but even the base free stuff is great.

Sorry - I started writing this like 20 minutes ago and got interrupted then posted it without knowing everyone already suggested this!! But I'm leaving it because it makes me feel like I'm part of a team of people who know stuff.

2

Joomla it self can only use the menuitems to control the visibility of modules.

One thing you can do is to hide the module position in the template something like this:

/templates//index.php

<?php if (JFactory::getApplication()->input->get('id') == 4711) : ?>
  <jdoc:include type="modules" name="submenu" /> 
<?php endif; ?>

This code will display the modules in the "submenu" position if the id parameter is "4711".

You see that this method needs some php knowledge and may not fit your needs.

2

Easy and powerful way is, as suggested using nonumber.nl advanced module manager extension.

Time consuming, also easy way is to create hidden menu items for these pages, but beware this will change their SEF

I use this also to make 1st level SEF urls for items in a submenu (by menu alias)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.