The LOADPOSITON Command
How to display Modules inside Articles
The image shown here illustrates a MODULE being displayed inside an ARTICLE using a Custom Position.
This is achieved using the LOADPOSITION Command.
The Joomla! CMS enables you to create CUSTOM Positions in addition to the ones included with your website's Template.
The CUSTOM Positions may be created inside Articles and Category introductions.
And therefore presented in the Main Body of your website i.e. between the LEFT and RIGHT sidebars.
For more information about Template Positions and POSITION MAPS, visit the link below.
Two alternative methods
The LOADPOSITION Command is one of two alternative ways of presenting MODULES inside ARTICLES using Custom Positions.
We focus on it here because it is the method we prefer to use.
1) Loadmodule Command
The Loadmodule Command allows you to publish just ONE Module inside an Article.
Example: display the Login Module inside an Article instead of an existing template position.
2) Loadposition Command
The Loadposition Command allows you to publish any Modules you assign to a CUSTOM POSITION inside an Article.
Our preference is to use the Loadposition Command.
LOADPOSITION Syntax
The Loadposition Command syntax we use to insert the above MODULE inside this ARTICLE looks like this:
In this example, the word EXAMPLE is the name of the CUSTOM POSITION.
If you prefer to use the Loadmodule Command then simply interchange loadmodule for loadposition in the above syntax.
The LOADPOSITION Plugin
The Content - Load Position Plugin must be enabled for you to be able to use either Command.
This plugin is enabled by default in a WYNCHCO website design - see image below.
How to use LOADPOSITION Command
"To insert a module inside an article, use the 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 in the article at the place where you want the module."
Source: docs.joomla.org.
EXAMPLES
1) Display a Module inside an ARTICLE
Follow the steps below to use the LOADPOSITION Command to publish a Module inside an Article.
Select Extensions > Modules from the menu at the top of the website dashboard.
Select a Module.
In the Module screen, look for the POSITION field under the Module tab.
Add the name of a CUSTOM POSITION to the field, making sure that you:
- enter a unique name,
- use only lower case letters without any spaces, and
- press the RETURN / ENTER key on your device keyboard after doing so.
Example Custom Position
example.
Important
If you do not press the RETURN / ENTER key then the Custom Position will not be created.
When you add the LOADPOSITION Command to an Article using curly brackets (as in the image below), it will call the Module you edited to the screen when the Article is viewed in the front end.
The Module you edited will now be visible inside the Article when viewed in the front end.
Image shows a Module displayed inside an Article
We show you how to insert a TEXT BUBBLE like the one shown in the above image in our separate article.
2) Display a Syndication Feeds Module inside a Category Introduction
We wanted to display a SYNDICATION FEED button at the top of our JOOMLERS.UK NEWS blog.
The LOADPOSITION Command made this possible.
We created a unique POSITION called: feeds.
We added the LOADPOSITION Command to the Category introduction of our JOOMLERS.UK NEWS blog.
Here is the HTML we used.
The result looks like this in our website.
Read more: Syndication Feeds Module.