DotNetNuke Tip: Module Setting - Display module on all pages

Welcome back to my series of DotNetNuke Tips. To get the tips program started back off I'll start with one of the most commonly used, commonly abused, and misunderstood options within the DotNetNuke application. That being the option on the modules settings for "Display Module On All Pages". To find this setting you must go to the Settings from the Module Actions for the module in question.

image 

Once you are on the Settings page you can expand the Advanced Settings header to see the checkbox for Display Module On All Pages.

image

So now that you know how to find this setting, let's talk about what it actually does. In its simplest form this setting will do exactly what it says, it will display the module you're configuring on every page created in your portal (not including admin or host pages). A more detailed explanation would be that the module will display in the pane of the same name as the on the original instance of the module exists in when the setting is applied. If one of the skins for the pages of your site does not contain a pane with the same name the module will default to show up in the ContentPane. There's one other catch to the "Pane" settings, in my experience by assigning a module to be displayed on all pages, it will be displayed at the top of whatever pane it is positioned in, and you will not be able to move it from this top position, even if you want another module to be on top.

The other downfall of this setting is that it will do exactly what the description entails, it will display this module on every single page of your site. If you're running a recent version of DotNetNuke you have something working in your favor: in more recent versions of DNN you can actually delete modules that are marked as display on all pages from individual pages. In older versions this wasn't possible, if you removed it, it was removed from all pages at that time.

So, what if you want to remove the module from all pages in a portal? You need to first go to the module settings and uncheck the Display On All Pages option, you don't have to do this from the original module, you can do this from any of the "copies" on any of the pages. Once you do this, the module will no longer be displayed on any of the other pages of the site, it will only be displayed on the page you are currently on, after this you can delete the module from this page and make it go away.

So there it is, a quick introduction to the Display Module On All Pages option in the module settings, and the restart of my blogging series of DotNetNuke Tips, I'll post more DotNetNuke Tips each week come back for more later.

13 Comments

  • I submitted a patch last year sometime to preserve the order when using this option. It just got ignored which i think is a massive shame.

    Currently it doesn't even use the sort order column, it just sets it to null. Why?

  • Hi Chris,

    I have a question.
    Is there a solution to control the order of the modules on the other pages when you use the display on all pages option?

    Thanks in advance!

    Regards,
    Heisa

  • 1. the option doesn't seem to work : if you create a new module and set the option for the first time then it works, but switch the option off and on again and the module stays local
    2. I created a template with in the right column a lot of sections, each with its own name. So I can place the module in one of those div sections. However, a "weight" factor as used by drupal would come in handy.

  • Is there a way to prevent the Text/HTML module from appearing on all pages?

  • In DNN 5 I am seeing the module show up on the Admin and host pages as well. I imagine this is because they are no longer treated differently than other pages.
    You can apply only to new pages which will avoid the module from being added to the admin/host pages.

  • Hello
    if you have added some page before the newly module, it wouldn't show the module on that pages, just newly created pges!
    why?

  • Is there a way to restrict module placement to only pages with the same content pane as the original placement? We have a site that needs a module placed on several pages in the same location, but there are additional modules that could be placed on the same area of the page. If i could make a skin for each set of modules with different content pane names i could have the specific modules display on the pages that needed them. I really don't see the logic behind place on every page even if the content pane is not there. Perhaps I don't fully understanding of how module placement works. It would make my life much easier if i could make a change to one module that is shared across multiple pages in one location rather than making it on each page the module is placed. This of course is referring to the content in an HTML module.

  • Jim, you should use the "add existing module" functionality from the control panel for what you are trying to do.

  • Hello,

    This option is very usefull in many situations. The point is that the moduleorder data is set to -1. It's a problem because you need to reorder your module. I asked DNN support why they set the sort order to -1 (why not applying the original value?). The answer didn't convinced me. I checked the source code and i read -1 (i can't update a stored proc to cheat). Well, I managed to write a dirty request to reorder the modules (scheduled to apply to new pages). I didn't find other workaround but if you have a clean method... welcome.

    Thanks,

    Laurent

  • It seems this won't add the module to the login page. This is probably by design, but is there a way to extend a module to be added to the login page as well?

  • Ahmed, you will need to create a login page, place the Account Login module on it, then set that in the Admin Site Settings as your Login Page.

  • I want to add the same module in all the pages, but different content. When I add the module to include in all pages it shows in all pages. but i can't customize the content for each page.

  • Manoj,
    That's not how the functionality works. You will have to add the module individually to each page, not using the setting discussed here in the blog post.

Comments have been disabled for this content.