Loading...
JoomlaJoomla 1.6Joomla 1.7Joomla ArticlesJoomla ModulesJoomla Tutorials

Joomla 1.7 Help – How to Place a Module in an Article

Joomla 1.7 Help – Placing a Module inside an Article

Modules you create are assigned to module positions and these module positions are displayed on your website as defined by the template you use.  Sometimes it is useful to display modules within articles, and in this instance there is no module position defined for that purpose.

Overview of what you need to do:

Assign the module a position not used in your template.  You can type it in and not select it from the drop down box.  Afterwards edit your article and enter in the {loadposition moduleposition} command where you want the module to be displayed.

For example:

  • I want to display a the random banner module inside my ‘Beginners’ article.
  • I will create a module position = moduleinsidearticle1

Below are steps:

Enable the “Content – Load Modules” plugin in the Plugin Manager

1.  Login to your Joomla 1.7 Administrator backend

2.  Click on ‘Extensions’, ‘Plug-in Manager

3.  Search for “Content – Load Modules”

4.  Make sure that the plugin is enabled

5.  If not enabled, click on the checkbox and click on ‘Enable’

Joomla 1.7 Content Load Module Plugin
Joomla 1.7 Content Load Module Plugin

Create a module with custom module position in the Module Manager

6.  Click on ‘Extensions’, ‘Module Manager’, New, Module Type = Banners

7.  In the Module Manager Banner Details, set the following values:

  • Title = Module In Article Title
  • Position = moduleinsidearticle1
  • Status = Published
  • Access = Public
  • Client = Joomla!
  • Module Assignment = On all pages

8.  Click on ‘Save & Close’

Joomla 1.7 - Set custom module position in Module Manager
Joomla 1.7 - Set custom module position in Module Manager

Edit the article and insert custom module position code in Article Manager

9.  Click on ‘Content’,’Article Manager’, edit article you want module to go in.  My example I edit ‘Beginners’

10. In the article content, place your mouse where you want your module to show up and enter in the code

{loadposition moduleinsidearticle1}

11.  Click on ‘Save & Close’

Joomla 1.7 Add module code in Article
Joomla 1.7 Add module code in Article

You can refresh your Joomla website now.  Open up the article that contains the article to test it out.   See mine below.  It worked perfectly.

Joomla 1.7 - Banner module shows inside Article Beginner
Joomla 1.7 - Banner module shows inside Article Beginner

Thanks,

Elaine

21 comments
  1. Pankaj

    Joomla1.7 :
    I’m using multiple loadpositions in a article and it is duplicating the first one instead of 2 different
    modules.

    {loadposition A}
    {loadpositon B}

    Is there some tag that I need to use between them?
    What is it that I need to do?

    1. Elaine

      Hi Pankaj,
      I guess it doesn’t work if you want to load 2 different module positions. In your Module Manager, can you assign both modules the same module position instead of separating it? That way will work.
      Thanks for your visit,
      Elaine

  2. Vimal

    Hi,
    This is great!

    I am, however, trying to load multiple articles with the same module position code, although it appears, it carries the same comment.
    How do I insert it in multiple articles and get only get new article comments ?

    Thanks!

  3. Harrisburg Website Design

    Thanks a lot, this helped me get the Google Map Directions working on one of my client’s websites.

    I used this load module plugin, and loaded the Google Map as a “wrapper” module. I set the wrapper module’s URL to the URL from the IFrame Google Maps embed code.

    Thanks for the clear description.

    Jon

  4. Jim Del

    Elaine:

    Thanks! I was surprised that this hadn’t changed much from Joomla 1.5. Regardless, until you know, you don’t know. I appreciate people like you who provide such detailed, step-by-step directions to help the rest of us make the transition to 1.7.

    Happy New Year.

  5. Brendan

    Thanks for the tutorial. I vaguely rememered I could do this but couldn’t remember the exact code. I struggled for a bit because I was unaware I could type my OWN module position into the position area – and I was looking for a position “moduleinsidearticle1”. I could see you said to make your own custom postion but I did not know I could do this by simply typing into the box! 🙂

    My purpose for doing this was to place a custom flash gallery I’d made inside the large area used for the articles – so I’ve not text in there – simple the load of the module which is a wrapper. But here’s a question. To test it I pointed the iframe wrapper to a site where I had the html and flash files set up – but these are not on my joomla site. If I want to put an address in for a html within a folder on the joomla site how do I do that. Say I had all I need in a folder called Gallery and the index.html file within it. Can I simply upload the folder to the joomla site and ‘point’ to the iframe with Gallery/index.html?

    Something rings bells about joomla security or such that will prevent this. Any help appreciated. And thanks again for your help.

  6. Jaggu

    Thanks Elaine for sharing this.

    I have several modules in the same position – one below the other, with different module ID. I want only one of these modules to be displayed. In the methos you haver described, all modules show up.

    Is there a way I can select only the module I want to be displayed?

    Thanks & Cheers

    Jaggu

    1. Elaine

      Hi Jaggu,
      You can create your own position name, ie one that doesn’t already exist on your template. If you are using Beez_20, in Step 7 – you can put position=myownmoduleposition-1. You can then put that module in that position.
      Thanks for your visit,
      elaine

  7. Anjali

    Hello, I tried your tutorial but it doesn’t work 🙁

    You installed a banner but where does the picture Joomla come from? Don’t I have to install it first?

    1. Elaine

      Hi Anjali,
      Step 1-6 is how to create the banners module to use inside your article. If you want to know how to add banners to your Banner selection, I’ve created a tutorial that can help you.
      If you are using Joomla 2.5, here is a tutorial to help you add banners to your site – here.
      If you are using Joomla 1.7, here is a tutorial to help you add banners to your site – here.

      I hope that helps!
      Thanks for your visit,
      elaine

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload