latest News, Update, Tutorials and much more
3 minutes reading time (681 words)

Load a module inside an article

Joomla! website developers usually have a few good tricks up their sleeves. Although magicians usually don't want to reveal their slight-of-hand goodies, Joomla! people are much more generous. All you usually have to do is ask. So what's one of my favourite Joomla! tricks? I'm glad you asked.

One of my favourite Joomla! tricks is the loadposition command . This gives you the ability to load a module inside an article. Just think of all the neat things that you can do with this. Using this technique your articles can have all kinds of dynamic content inside them. You can insert a weather module, rotating images, or a Twitter feed inside an article, whatever you can do in a module you can put in your article.


So how do we do this trick?

The trick simply calls a module into a position inside the article. Here's how you do it:

In your Joomla! administration go to the Module Manager (Extensions > Module Manager)

Make a new module in the module manager
Give the module a Title

Here's one part of the trick (pay attention):

Inside the module "Details" settings place your curser inside of the "Position" field and instead of picking a position from the drop down, create a unique position name that does not exist in the template. Do this by highlighting all the text that is showing in the "Position" and type your new position name in there. Type something like "mynewposition" (without the quotation marks) in the "Position" field.

Now we will finish setting the other normal module parameter stuff:

The "Order" of the module is not important. You don't need to do anything in this drop down.
Make sure the "Access Level" is "Public" if you want this module to show up to all the readers of your site.

For the "Menu Assignment" make sure the radio button for "All" is selected. This way your module will be available to use anywhere in your site.
Select "No" for "Show Title" of the module
Enable the module by selecting the "Yes radio button for "Enabled"
Click the "Save" icon on the top right corner of your admin browser window.

The next part of the trick is getting the module called inside your article where you want it to appear

So you now have your module prepared but it's not showing anywhere in your site at the moment. Although this module is set to appear in "All" the menu positions of your site, it doesn't show up anywhere because there is no module position in your template with that unique name you gave it. Here's how you call the module into your article:

Go to your "Article Manager" (Content > Article Manager)
Select the article that you would like your module to appear in
Place your curser in the spot in your article where you would like to call your module to appear and type:

Make sure the "positionname" of the command between the curly brackets you typed is the name of the unique module name you gave the position. So if you named it "mynewposition" the command would be
Click the Save" or "Apply" icon at the top right of your window to save your article change and check the article in the front end of your site. Remember to refresh your browser window if the article was previously loaded before your change. Your module should now appear in the article where you used the command.

The trick simply calls a module into a position inside your article

If you see "" in your article instead of your module, it means that the Content - Load Module plugin is not enabled. Go to the "Plugin Manager" (Extensions > Plugin Manager) and enable the plugin by making sure that the green check mark " √ " instead of the red "x" is showing in the "Enabled" column for the Plugin Manager.

An example of where I have used this trick is right on this page! The Google ad in the middle of this article is an ad module called into the page using the command.

How to reset Joomla admin password
Moving Your Joomla Website
sepratord j1


Schedule a
Free Consultation

Sometimes a relationship needs a little nudge to help it grow.
Tell us a few things about yourself and we will show you a lot more about us.

Please type your full name.
Invalid email address.
Invalid Input
Invalid Input
Invalid Input

sepratord j1