Tuesday, 21 April 2009 20:57
Wondering how to include a module position within another module position in Joomla 1.5? A content item is easy, but a module? Here's the answer: Let us know how you apply it.
I just encountered an issue on this very website where I wanted to include a Joomla module within an existing Joomla module. This functionality was present in Joomla 1.0x but is not in Joomla 1.5. This is likely because the Joomla 1.5 structure does not load plugins into modules. After doing some research, I noticed others were asking the same question but with little return in the form of answer. Thus I decided to do some digging and figure out how to make it work. Luckily, it turns out to be a pretty easy and straight forward process.
UPDATE: I recently discovered a free plugin that will make this process even simpler! It's called Modules Anywhere -- I have not yet personally tested it but it has strong reviews and most users seem to be getting along just fine! Download it here! If you like it,don't forget to make a donation to support the developer.
Assuming that you have two (or more) modules, and you would like to include one or more of these modules inside the other. Here's how you do it!
- First, download and install Sourcerer. It's a module/plugin for Joomla 1.5 that allows you to include PHP code ANYWHERE in Joomla. Additionally it has a nifty module feature that we'll be using. Grab it here: http://www.nonumber.nl/sourcerer
- Install Sourcerer. You'll need to start by unzipping the archive. After unzipping the archive, you are left with 3 files: One module and two plugins. Install all 3. (Go to Extensions > Install/Uninstall)
- Next, publish both plugins. Go to Extensions > Plugin Manager. Now locate: "Editor Button - Sourcerer!" and "System - Sourcerer!" and publish both. You do not need to change any of the paramters for either.
- Now go to Extensions > Module Manager. You should have two (or more) modules and you would like to include one or more of these modules inside the other. Make a note of the ID's of the modules you would like to include together. I.e. 45 and 50. The ID column is the one on the far right. You could also use the module title, but since this is subject to change, I recommend you use the module ID so that you don't run into problems down the road.
- Next, locate the Sourcerer module and click on it. This special module does the work of including the plugin into the module. The way Sourcerer works is to allow you to include PHP or JS inside thephp or JS heresyntax. Because Joomla 1.5 won't allow us to include plugins in Modules, this syntax doesn't work in any standard module. Thus we need to use the Sourcerer Module to include our PHP/JS or Module Positions. The Sourcerer module is essentially a Custom HTML module -- with this one additional ability. So don't fret, you can still accomplish exactly what you want.
- Now scroll down to the editor. Enter this code to include a module:
{module ID or Module Name Here}
Here's what mine looks like:
<div style="float: left">{module 45}</div>
<div style="float: right">{module 50}</div>
Note this allows you to use HTML. Thus, if you wished you could include one module, (such as a menu) and then add your custom HTML code instead of including a separate module that included this HTML. For simplicities sake, I prefer to just include both modules into this one module. Note you're including a single module (the one assigned to ID 45, and 50, in my case) and not a module position. In an article, you can include a module position using - but this won't work within a module. Hence the work around. - Publish the Sourcer Module into the position of your choice. Save!
- Return to Extensions > Module Manager and UNPUBLISH or change to a hidden position the two modules you just included. This way they won't show up twice. Unpublished modules will still show up in the Sourcerer Module.
- That's it! You've now included multiple modules into one. If you need to do this more than once on your site, just copy the sourcerer module and repeat!

BEVERLY30DALE
said:
|
reply this topic I had got a desire to begin my company, nevertheless I didn't have enough of money to do this. Thank heaven my colleague told to take the loan. Hence I took the consolidation loans and made real my desire. |
edwin
said:
|
I figure it out you have to make a new custome module and type the code {module X} and it works thank you. |
edwin
said:
|
I dont see the module I installed sorcerer but don't see the module can anybody help me. |
Christy Turlington
said:
|
Reply Thanks for the information. This is a wonderful post!! thesis writing essay format |
tido
said:
|
not working!!!! none of these programs come with there modules only the plugins. am i doing something wrong? |
JensenEmily20
said:
|
reply this post If you are in not good state and have no money to get out from that point, you would require to receive the loans. Because that will help you definitely. I take college loan every year and feel myself good because of this. |
scGrace
said:
|
Re Thank you a lot for the really good topic close to this topic. Can you aid to detect the thesis writing or an experienced dissertation service to purchase the dissertation subject in? |
John
said:
|
Can't find the module! I successfully installed the plugin, but can't find the module! I can see the Editor & System under plugin, but no module, how do I make this work, please help. Thanks. |
DAnny
said:
|
This doent work? Not only does it not work, on the website for "modules anywhere", there modules are loaded in article content lol. this uses © 2011 MPA Computers. All rights Reserved. | Website Developed by MPA Computers. | Hosted by MPA Hosting. ! Help |
Beto
said:
|
Can't find the Sourcerer Module Hi guys... i didn't find the sourcerer module on my modules maganer... |
Peter van Westen
said:
|
Modules in modules and anywhere else... Some time ago I created Modules Anywhere with which you can place modules in modules! |
Andrew
said:
|
this doesn't work anymore, in new version, so stop looking! but there is hope! if you go to the site and select the "upgrading to v2" tab it explains how this technique no longer works, but it has a link to http://www.nonumber.nl/modulesanywhere that should work |
David
said:
|
module in custome module This is what I have been looking for. I tried the normal {loadmodule position} and keep getting the entire text itself. Then, I kept viewing the forum and found this solution suggested by someone else who was looking for the same solution. For any one who wants to see a demo, see it at the bottom half of all the pages at Drugzoo.com by clicking HERE. Thanks Developer. |
Shuja
said:
|
Thankyou After a long quest i was able to load two modules within one module. It was easy through your guide lines Thank you Dear |
Loading Poll...