Modules Anywhere

Place modules anywhere in Joomla!

  • Last updated: 04-Sep-2017
  • Version: 7.4.0
  • Types: System plugin Editor button plugin
  • Joomla rating: 100%
Joomla rating: 100%

Do you like Modules Anywhere?

Rate it!

Tutorial for Modules Anywhere

There is a Free and a Pro version of Modules Anywhere.
The parts in this tutorial that only concern the Pro version will be marked with: Pro only

Introduction

Modules Anywhere is a Joomla! system plugin (and editor button plugin).
You can place modules anywhere in your site, including within 3rd party components, modules and even inside other articles.

You can, for instance, place the module ‘My Module’ in an article by simply placing:

{module 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.

Note: You should place the tags into the normal WYSIWYG view of your editor and NOT in the HTML/code view.

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 extra parameters to the tag.

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

As soon as you add 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:

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

Overruling HTML styles

You can easily place the module (or module position) with another style than you have set as default (default is none). Just add the style parameter:
{module title="Main Menu" style="division"}

What HTML styles (chrome) you can use, depends on your template.

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

Overruling Module parameters Pro only

You can also overrule module parameters via the {module} tag. This way you can have one 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 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"}

 

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 troubleshooting 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 in tact.

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 {loadposition} tags Select to also handle the {loadposition} tags from the Joomla core plugin Load Module.

It is recommended to disable the Load Module plugin.

Installation

You can either install Modules Anywhere by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful Regular Labs Extension Manager.

Note: When updating Modules Anywhere, you do not need to uninstall it first. The package will update all the files automatically.

Keep in mind that when you update to a major new version (or uninstall first), you might lose some configuration settings.

Regular Labs Extension Manager

It is very easy to install/update any Regular Labs Extension using the Regular Labs Extension Manager.

Please see the Tutorial for the Regular Labs Extension Manager for more detailed information...

Joomla! Extension Manager

To install via the Joomla! Extension Manager, just follow these steps:

  1. Log into your Joomla administrator;
  2. In the menu, choose: Extensions >> Extensions;
  3. Choose the tab: Install from Web (or enable it if you haven't done so yet);
  4. Select the search field and enter Modules Anywhere and hit enter;
  5. Click on the Modules Anywhere listing;
  6. Click on Install;
  7. Click on Install to confirm.
Joomla! Installer - Install from Web

Or if you need to install the Pro version or cannot install via the 'Install via Web' method for some reason:

  1. Download the extension install file (.zip);
  2. Log into your Joomla administrator;
  3. In the menu, choose: Extensions >> Extensions;
  4. Choose the tab: Upload Package File;
  5. Click on the Choose File button and select the extension zip;
  6. Click on Upload & Install.
Joomla! Installer - Upload Package File

If you have problems installing Modules Anywhere, please try the manual installation process as described here: docs.joomla.org/Installing_an_extension