Forums

Full Version: {loadmodule} in an Article - How To?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is very powerful to be able to load a module from within an article. An article can be called from a menu item, so this means that a module can be called by using a menu item.

How To?

Step 1: Create a module using Module Manager. This module is of a "Module Type" and it has a "Title"
Step 2: Create an article using Article Manager. Add just one line
                      {loadmodule "Module Type","Title"}[attachment=185]
Step 3: Associate the article created in step 2 with a menu item.

PRE-CONDITION: "Content - Load Module" plugin status should be active. Check by using Plugin Manager.
[attachment=182][attachment=183]

Everybody says that "IT IS NOT WORKING".

WHY?

Because the secret is in the "Module Type" that is not explained properly anywhere.
[attachment=184]
In Joomla installation there is a directory called "modules". In above picture, I copied subdirectories of module directory in front of each Module Type.

Important point to note is that when you write {loadmodule Module Type,Titile of your module}, Module Type is the part of directory name starting after mod_ .

Hence if you have a module named "Committees" of type "Articles - Newsflash, you will write
{loadmodule articles_news,Committees}

For Feed Display module type you will write {loadmodule feed,Latest} (if Latest is the Title of your module}

Now you know where Module Type comes from; once your {loadmodule} parameters are correct, it will work and will show you its power and charm.

Notes:
1.
No unnecessary space in {loadmodule module_type,title however it was written}
2.
If {loadposition} is working and {loadmodule} is not working then it is highly likely that there is a mistake in writing module type name.