You will usually want to associate modules with articles in some way. The modules are allocated to module positions and the module positions appear somewhere on the Web page as determined by the template. However, it is sometimes useful to have a module actually embedded within the article.

You will usually want to associate modules with articles in some way. The modules are allocated to module positions and the module positions appear somewhere on the Web page as determined by the template. However, it is sometimes useful to have a module actually embedded within the article.

To insert a module inside an article, use the ''{loadposition xx}'' command, as follows:

To insert a module inside an article, use the ''{loadposition xx}'' command, as follows:

−

#Create a module and set its position to any value that doesn't conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position ''myposition''.

−

#Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to '''all''' Menu Items.

−

#Edit the articles where you want this module to appear and insert the text ''{loadposition myposition}'' in the article at the place where you want the module.

−

Note that this only works when the [[Screen.plugins.edit.15#Content_-_Load_Module|''Content - Load Module'' plugin is enabled]]. If this plugin is disabled, the text ''{loadposition myposition}'' shows unchanged in the article.

+

#Create a module and set its position to any value that doesn't conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position '''''myposition'''''.

+

#Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to '''all''' Menu Items. The module will not show unless you put the command to load the module in an [[article]].

+

#Edit the articles where you want this module to appear and insert the text '''''{loadposition myposition}''''' in the article at the place where you want the module.

+

{{dablink|*Note that this only works when the [[Help25:Extensions_Plugin_Manager_Edit#Content_-_Load_Modules|''Content - Load Module'' plugin is enabled]]. If this plugin is disabled, the text ''{loadposition myposition}'' shows unchanged in the article.}}

−

== loadmodule ==

+

+

===loadmodule===

An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.

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.

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 ==

+

===Modules within Modules===

It is possible in Joomla! 2.5+ to include a module within a "Custom HTML" module as they are processed by content plugins in the same way as articles.

It is possible in Joomla! 2.5+ 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.

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.

−

[[Category:FAQ]]

+

<noinclude>[[Category:FAQ]]

[[Category:Version 1.5 FAQ]]

[[Category:Version 1.5 FAQ]]

[[Category:Version 1.6 FAQ]]

[[Category:Version 1.6 FAQ]]

[[Category:Version 1.7 FAQ]]

[[Category:Version 1.7 FAQ]]

[[Category:Version 2.5 FAQ]]

[[Category:Version 2.5 FAQ]]

+

[[Category:Version 3.0 FAQ]]

+

[[Category:Version 3.1 FAQ]]

[[Category:Administration FAQ]]

[[Category:Administration FAQ]]

[[Category:Article Management]]

[[Category:Article Management]]

−

[[Category:Module Management]]

+

[[Category:Module Management]]</noinclude>

Revision as of 08:05, 29 April 2013

This tutorial is for Joomla! CMS Version(s)

You will usually want to associate modules with articles in some way. The modules are allocated to module positions and the module positions appear somewhere on the Web page as determined by the template. However, it is sometimes useful to have a module actually embedded within the article.

To insert a module inside an article, use the {loadposition xx} command, as follows:

Create a module and set its position to any value that doesn't conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.

Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items. The module will not show unless you put the command to load the module in an article.

Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.

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+ 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.