Actions

Difference between revisions of "How do you put a module inside an article?"

From Joomla! Documentation

(Added italics markup in several places.)
Line 1: Line 1:
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 in the article content itself.
+
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 you 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".
+
#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.
+
#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 show and insert the text "{loadposition myposition}" in the article, at the place where you want the module to show.
+
#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.
The module will show at that point in the article.
+
 
+
Note that this only works when the plugin 'Content - Load Module' is enabled. If this plugin is disabled, the text "{loadposition myposition}" shows unchanged in the article.
+
  
 +
Note that this only works when the ''Content - Load Module'' plugin is enabled. If this plugin is disabled, the text ''{loadposition myposition}'' shows unchanged in the article.
  
 
[[Category:FAQ]]
 
[[Category:FAQ]]
 
[[Category:Version 1.5 FAQ]]
 
[[Category:Version 1.5 FAQ]]
 
[[Category:Administration FAQ]]
 
[[Category:Administration FAQ]]

Revision as of 20:10, 16 March 2010

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:

  1. 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.
  2. 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.
  3. 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 Content - Load Module plugin is enabled. If this plugin is disabled, the text {loadposition myposition} shows unchanged in the article.