More than 800+ satisfied clients and counting, since 2010

Blog

How to put a module inside an article in Joomla?

There are many times when you may want to insert a module into a content item in Joomla. This is a common desire with aesthetic modules such as AnyCode or MoeScroll. The ability to put the contents of a module right into the body of an article is one of the handiest tools you can have in your Joomla toolbox. Here is how to put a module inside an article in Joomla. In Joomla, modules are placed in positions.Then; those positions are defined by your template. You can however put a Joomla 2.5 module in an article, if needed. The Joomla team has provided us with the loadposition positioname function to place a module inside of a Joomla Article. This function allows you to specify a specific module position that will be shown wherever you like in any article. This can be a significant timesaver, as you can create a module one time in the Module Manager and then simply place it into any number of articles on your site. That means you wouldn’t have to set up that content individually in every article. You can do the work once and then simply tell Joomla where you want that module to appear. Below are the steps required to create a new module position and have it show up in your article. This method can be used to insert virtually  any module into virtually any Joomla article.

Setting up the new module position

  1. Login to the administrator panel of your Joomla website.
  2. Click on the menu item ‘Extensions’ then click ‘Module Manager’
  3. Click on the title of the instance to edit the module parameters if you already have an instance of the module setup that you would like to use.  Click on the ‘New’ icon in the top right of your screen, if you do not have an instance of the module ready.
  4. Now, we need to set the module to a new unused position. In order to achieve this, click on the drop down box next to the ‘Position’ option. The cursor will now be flashing inside the box. Delete the text that is currently in the box, then type in a distinct, new module position.
  5. Set the ‘Menu Assignment’ parameter to All. Setup the rest of the parameters that you would like for the module and click the ‘Save’ icon.


Setup the article to show the module

  1. Click on the ‘Content’ menu item and then ‘Article Manager in the administration panel.
  2. Now click on the name of the article that you would like the module to appear in, or click ‘New’ to create a new article to work with.
  3. Find the spot in the article where you would like the module to show up and insert the following code: { loadposition article_1}
  4. The last step is to simply save the article and refresh the page on the front-end of your site.

If the module is not showing up, check the following:

  1. Double check that the ‘Menu Assignment’ parameter in the module’s settings is set to ‘All’
  2. Click on ‘Extensions’ -> ‘Plugin Manager’ in the Administration Panel.  Ensure that the ‘Content – Load Module’ plugin is enabled.
  3. Clear your site’s cache and refresh the page.

Written by

The author didnt add any Information to his profile yet