Tutorial:

Introduction

Modules Anywhere is a Joomla! system plugin (and editor button plugin).
You can include single modules or complete module positions anywhere in your site, including articles, inside other modules, or even 3rd party components and template overrides.

You only need to place a simple tag like this to place a module:

{module Name of My Module}

How to use it (syntax)

You can place modules via Modules Anywhere by using plugin style tags right into your WYSIWYG editor.

To place a single article, you can use the {module} tag.

You can also place complete module positions by using the {modulepos} tag.

Single module

The syntax is very simple. You tell the {module} tag which module to show simply by using the title or id of the module:

{module Some module}
{module 123}

Module positions

The {modulepos} tag works very much like the {loadposition} plugin in Joomla's core. But it works better :)
The main difference is that you can use the {modulepos} tag anywhere you can enter text, so not only in articles.

Just add the position name inside the {modulepos} tag, like:

{modulepos position-7}

Extra parameters

Further on in this tutorial you will see you can control how the module works by adding parameters to the tag.

The syntax of these parameters looks like name="value", which you might recognise from how html works.

If you want to add extra parameters, you will need to place the module title/id in a parameter too, like:

{module title="Some module" style="none"}
{module id="123" style="none"}

You may also place the title in a title parameter when not having extra parameters. So these will both work the same:

{module title="Some module"}
{module Some module}

Overruling HTML styles

You can easily place the module (or module position) with another style than the one you have set as default (default is none). Just add the style parameter:

{module title="Main Menu" style="well"}
{modulepos position="position-7" style="well"}

The HTML styles (chrome) you can use depend on your template.

The Joomla template Protostar comes with the HTML style well.
The Joomla template Beez comes with the HTML styles division and tabs.

Overruling Module parameters Pro only

You can also overrule specific module parameters via the {module} tag. This way you can have a module displayed in different ways, with different settings just by overruling the settings via the tag.
You can overrule any parameters you can find in the module edit screen (in the administrator).

{module title="Main Menu" moduleclass_sfx="red" some_other_setting="123"}

So you can easily switch on/off the title with the showtitle parameter (true/false):

{module title="Articles from Category" showtitle="false"}

Or change the number of displayed items in a listing module with something like:

{module title="Latest News" count="10"}

To find the name of the field, you can look in the html output of the module edit page. Look for the id of the parameter field. This is the part in the brackets in the field name: jform[xxx]

Fixing HTML output

Modules Anywhere will - by default - try to fix issues in the html output of the module (including the surrounding html tags).

It does this to prevent html structure issues potentially caused by the html of the module being placed inside whatever html the {module} tag is placed in.
For instance, if the {module} tag is inside a paragraph (<p> tag) and the module outputs a <div> structure, you get a <div> tag inside a <p> tag.
That is invalid html and Modules Anywhere will fix that. In this case by removing the surrounding <p> tags.

There are however some modules that output invalid html structures out-of-the-box and rely on that faulty structure to function. When Modules Anywhere 'fixes' that html, the module will stop working.

For these edge cases you want Modules Anywhere to leave the html alone and simply output it.
You can do this by either switching off the Fix HTML option in the Modules Anywhere system plugin settings, or by switching this off via the {module} tag:

{module name="Name of the Module" fixhtml="false"}

 

Editor Button

You can enter the tags directly into your content. However, to save time typing and remembering what the exact syntax is, Modules Anywhere comes with a handy editor button.

You can use this editor button (located below the text input area) to place an {module} or {modulepos} tag into your article (or other editor fields).

You can customise the default tag settings in the Modules Anywhere system plugin settings.

Settings

Modules Anywhere is packed with options, giving you control over how it works and behaves. Here is the full list of the options you can find in the Modules Anywhere system plugin settings:

Styling

Default style Select the module style (chrome) to use by default. If no style is given in the module tag, this style is used.
Styles List A comma separated list of styles (chromes) that will be available as a list in the Editor Button popup window.
Enable style overriding If selected, you can add a style parameter in the tag like:

{module Main Menu|horz}

Behaviour

Enable parameter overriding If selected, you can override the modules parameters in the tag like:

{module title="Main Menu" ​moduleclass_sfx="red" ​some_other_setting="123"}

This only works for the module tag (not the modulepos tag).

You can find the parameter names in the html of the modules settings page (name="param[...]") or look in the modules xml file.
Ignore Module Access Level If selected, the module access level selection will be ignored.
Ignore Module State If selected, unpublished modules will still be placed by the tag.
Ignore Module Assignments If selected, module assignments (like date and menu item assignments) will be ignored.
Ignore Caching By default, modules that have module caching switched off, will not be handled by Modules Anywhere on the article level, but at a later stage. This is to prevent Joomla from caching the module's output when caching the article.
If selected, the module will be handled on article level even when caching is switched off for the module. Enable this if certain modules have problems with placing their css/javascript files and you need to keep their caching setting disabled.
Frontend Editing Select if you want mouse-over edit icons for modules and menu items (support may depend on your template).
Fix HTML Select to let the extension fix any html structure issues it finds. This is often necessary to deal with surrounding html tags.

Only switch this off if you have issues with this.
Place HTML comments By default HTML comments are placed around the output of this extension.

These comments can help you troubleshoot when you don't get the output you expect.

If you prefer to not have these comments in your HTML output, turn this option off.

Security Options Pro only

Articles

These settings have effect on Articles and Categories.

Enable in articles Select whether to enable the use of the syntax in articles.
Security Level Set the level of security. Modules Anywhere tags will be stripped from articles with an owner (creator) below this group level.

Components

These settings have effect on the component area.
You can select in which components Modules Anywhere should not be enabled. Advise is to not allow Modules Anywhere in components that non-backend users can post content in.

Enable in components Select whether to enable the use of the syntax in components.
Disable on Components Select in which components NOT to enable the use of the syntax in. This is a list of your installed frontend components.
Remove in Disabled Components If selected, the plugin syntax will get removed from the component. If not, the original plugins syntax will remain intact.

Other Areas

These settings have effect on areas outside the component area (so in Modules and the rest of the website).

Enable other areas Select whether to enable the use of the syntax in all remaining areas, like the modules. The tag will not be handled/shown in the html head (META tags and such).

Editor Button Options

Button Text This text will be shown in the Editor Button.
Enable in frontend If enabled, it will also be available in the frontend.

Default Data Tag settings

Set the default values of the Data Tag selections for the Modules Anywhere popup

Show Title Show or hide module title on display. Effect will depend on the chrome style in the template.

Options: Default, Yes, No

Advanced Settings

Module tag The word to be used in the tags.

Note: If you change this, all existing tags will not work anymore.
Modulepos tag The word to be used in the tags.

Note: If you change this, all existing tags will not work anymore.
Tag Characters The surrounding characters of the tag syntax.

Note: If you change this, all existing tags will not work anymore.

Options: {...}, [...], {{...}}, [[...]], [:...:], [%...%]
Handle Joomla core module tags Select to also handle the {loadmodule} and {loadposition} tags from the Joomla core 'Load Modules' plugin.
It is recommended to disable the Load Modules plugin.
FAQs:

The {module} tags are not being converted

The Modules Anywhere plugin is not published

Check if the Modules Anywhere plugin is published. Go to Extensions >> Plugin manager and search for the system plugin System - Regular Labs - Modules Anywhere. Then publish it.

There is markup on the {module} tags

If you have copy/pasted code directly into your editor, you might also have copied along hidden HTML tags. So this will also cause the {module} tags to break:

{<span>module</span> ...}

Remove the extra styling or other html tags around and in the {module} tags that might cause problems.

The module does not work

Javascripts and/or Stylesheets are not placed

If you are placing the module via a Custom HTML module, switch on the 'Prepare Content' option in that module.

 

Some slideshow modules or other fancy modules will not work properly when placed through Modules Anywhere.

Some javascript based modules don't like to be placed any other way than through a module position. Which is quite understandable, frankly.
Modules Anywhere outputs the modules in areas where they shouldn't really be (they are not designed with that in mind at least).

So modules that rely on javascripts might not work, because they can't place the scripts in the right way or something.

The same issue might arise for some modules that place stylesheets (css).

The workaround is to place the module in a hidden module position.
Make a new module position in your template called 'hidden' (or something else if you want), and wrap it in a hidden div.
To do that, add this to the bottom of your templates index.php (above the </body> and debug module tag):

<div style="display:none;"><jdoc:include type="modules" name="hidden" /></div>

And then assign the module to your new hidden module position.

Module cannot be placed multiple times

Some modules (also javascript based ones) don't like to be placed more than once. These won't work either if you place them twice on one page using normal module positions.

In this case, try to not have the module in the side or somewhere else if you want it in the article.

The {div} tags are showing

Since version 7.0.0 the support for the {div} tags have been removed.

There is a message you should see when updating from an older version that says:

Modules Anywhere no longer supports the {div} tags.
If you are using these, you will need to replace them with normal html <div> tags.

If you still need this functionality, you will need to downgrade to Modules Anywhere v6.0.6.

The removal of the {div} support is also stated in the changelog.

The module's output is messed up

Modules Anywhere will - by default - try to fix issues in the html output of the module (including the surrounding html tags).

It does this to prevent html stucture issues potentially caused by the html of the module being placed inside whatever html the {module} tag is placed in.
For instance, if the {module} tag is inside a paragraph (<p> tag) and the module outputs a <div> structure, you get a <div> tag inside a <p> tag.
That is invalid html and Modules Anywhere will fix that. In this case by removing the surrounding <p> tags.

There are however some modules that output invalid html structures out-of-the-box and rely on that faulty stucture to function. When Modules Anywhere 'fixes' that html, the module will stop working.

For these edge cases you want Modules Anywhere to leave the html alone and simply output it.
You can do this by either switching off the Fix HTML option in the Modules Anywhere system plugin settings, or by switching this off via the {module} tag:

{module name="Name of the Module" fixhtml="false"}

The core "Module" editor button gets disabled upon installation

Correct. Joomla has its own Module editor button. Seeing Modules Anywhere has similar - but much better - functionality, Modules Anywhere will disable the Joomla core editor button plugin upon installation / update.

If you want Modules Anywhere to leave the Joomla core editor button plugin alone, just add modulesanywhere_ignore anywhere in the custom_data field of the core Module editor button plugin in the database.
This requires you to do this manually in the database. You can find the Joomla core Module editor button in the #__extensions table.The row you want to edit will have plg_editors-xtd_module in the name column.

Free vs Pro:

Place modules::Place any module anywhere on your website
Place module positions::Place any module position anywhere on your website
Select module styles via Editor Button::Option in editor button popup window to select the desired module styles
Ignore settings::Ability to ignore the module access level, state and assignments when placing the module.

Parameter overriding::Ability to override module parameters via the module tag
Frontend Editing::Have the frontend module editing buttons available on modules placed through Modules Anywhere
Advanced Security Control::Disable the ability to use the plugin tags by selected User Group Levels and Components

Examples:

You can find a multitude of examples on the dedicated Modules Anywhere Demo Page.

Visit the Demo Page >>>

With Modules Anywhere you can include single modules or complete module positions anywhere in your site, including articles, inside other modules, or even 3rd party components and template overrides.

You can place modules literally anywhere you want, wherever you have the ability to enter text.

You only need to place a simple tag like this to place a module:

{module Name of My Module}

Modules Anywhere is a lot more flexible that the Joomla core "Load Modules" plugin. Here are some of the great advantages:

  • It works anywhere, not only in articles. It works in other modules, and even components and template overrides.
  • You have the ability to ignore the module access level, state and assignments when placing the module.
  • You can control the html display style from within the tag, not only one global setting.
  • You can override settings/parameters in the module. Pro only
  • You have some security setting, so you can disable this feature for lower user types. Pro only
  • It comes with a very easy to use editor button.
  • You can set Modules Anywhere to also handle the Joomla core module tags. In that case, you can safely disable the "Load Modules" plugin altogether.