How to Add a Module Inside an Article in Joomla 5 & 6 (loadposition and loadmodule)

put-a-module-inside-an-article-in-joomla

Written by

in

To show a module inside a Joomla article, publish the module to a custom position and type {loadposition your-position} in the article, or load one specific module with {loadmodule mod_name,Module Title}. Both shortcodes come from the core Content – Load Modules plugin in Joomla 4, 5 and 6.

Option 1: {loadposition} (load every module in a position)

  1. Go to Content → Site Modules and click New. Choose a type, for example Custom, Articles – Latest or Menu.
  2. In the Position field type a new name that your template does not use, for example article-promo, and press Enter to create it.
  3. Under Menu Assignment choose “On all pages” (or the pages where the article appears). A module assigned to no pages will not load, even inside an article.
  4. Save and close the module.
  5. Open the article and, where the module should appear, type {loadposition article-promo} on its own line. Save.

Every published module in that position is rendered, in module ordering. Add a style to change the chrome: {loadposition article-promo,card} uses the Cassiopeia “card” style; none outputs the module without a wrapper.

Option 2: {loadmodule} (load one module by type and title)

Use this when you do not want to create a new position:

{loadmodule mod_custom,Spring offer}
{loadmodule mod_articles_latest}

The first value is the module type (as listed in the Modules list, for example mod_custom), the second is the exact module title. Without a title, Joomla loads the first published module of that type. Joomla 4 and later also accept {loadmoduleid 97} to load a module by its ID, which is the safest choice if titles change.

Make sure the plugin is enabled

Go to System → Manage → Plugins, search for Content – Load Modules and check it is enabled. In its options you can set the default module style. If the shortcode appears as plain text on the page, this plugin is disabled or the text editor has wrapped the code in a link or span.

Why the module is not showing

SymptomFix
Shortcode shows as textEnable Content – Load Modules; retype the shortcode in the editor’s code view
Nothing appearsModule unpublished, assigned to no pages, or access level higher than the visitor’s
Shows in the article but also in a sidebarThe position name is used by the template; pick a unique name
Works in the article view but not in a blog/featured layoutCheck “Show Intro Text” and that the shortcode is in the intro, or use the full article view

More fixes in Joomla module not showing and module position not showing. Need a module built for your site? See Joomla module development or try the free Joomla module generator.

Frequently asked questions

What is the difference between loadposition and loadmodule?

loadposition renders every published module assigned to a position. loadmodule renders one module chosen by its type and title, and loadmoduleid renders one module by its ID.

Why does {loadposition} show as plain text?

The Content – Load Modules plugin is disabled, or the editor has inserted HTML inside the braces. Enable the plugin and retype the shortcode in code view.

Does loadposition work in Joomla 6?

Yes. The Content – Load Modules plugin is part of Joomla 4, 5 and 6 core.