Loading a Joomla 2.5 module into another module

Mohammad Naji picture Mohammad Naji · Aug 20, 2012 · Viewed 16.7k times · Source

I've seen the question Loading a module in another module in Joomla, but that was about Joomla 1.5

I have exactly the same question about Joomla 2.5

Is there an official way to do so?

Answer

Craig picture Craig · Aug 20, 2012

If you're using a "Custom HTML" module the standard {loadposition myPosition} or {loadmodule myModuleTypesName} work as expected.

Did you mean something else?

I've updated the wiki article with the following information as well.

loadmodule

An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin. In this case the plugin looks for the first module that who's type matches the string 'yyy'. So, you could load a "mod_login" module by placing {loadmodule login} in your text.

Modules within Modules

It is possible in Joomla! 2.5+ (possibly earlier) to include a module within a "Custom HTML" module as they are processed by content plugins in the same way as articles. You should remember when doing this that you may experience formatting issues as the "chrome" of the "Custom HTML" module will surround the "chrome" of the included module potential having undesirable effects of the formatting or layout.