Adding Dynamic Joomla Modules and Content to Other Websites

29th May, 2009 in Design/Development 6 Comments

Just after publishing my latest blog, Integrating Joomla and Zencart (Sort Of) Using CURL and Standalone Templates, I realised that this method can be used to show Joomla modules on just about any website that you can add code to. The blog is mainly about Zencart because that’s what I use it for, but I realised if you have any other website you can access the code for, then you can follow these instructions to add Joomla modules to your website.

So just to summarise my previous blog:

  1. Create your standalone modules in a  new template, so it could be your Latest News, Navigation, Newsflash, or even Joomla content pages.
  2. Assign the standalone module to a menu item and obtain that menu item URL
  3. Visit the URL in a browser just to test the standalone module displays on its own
  4. Add the CURL script to other websites where you want this module displayed
  5. Hey presto, Joomla modules or content displayed on other websites!
Picture of janko

janko 2nd January, 2012 at 18:22 pm

hi. can you please help me how should look that curl script to get work this?? im just starting with joomla and need a help. thank you

Picture of Laurence Cope

Laurence Cope 2nd January, 2012 at 18:22 pm

Hi janko. The curl scrip I use works as I’ve shown above. You do need curl enabled of course. But as per my note above I don’t think this is the best solution though, it sometimes doesn’t work for me. But you can try it.

Picture of Debbie Barrie

Debbie Barrie 2nd January, 2012 at 18:23 pm

Hi. Im looking to create a module in joomla that will populate based on a link selection. For example, I have a list of names on my page. If I click on name A, then the player stats module that I have created will populate with this player stats. If I click on the name underneath than the same module will be replaced with the second players stats? Is this possible?

Picture of Laurence Cope

Laurence Cope 2nd January, 2012 at 18:23 pm

@Debbie Barrie Hi Debbie. I would say this requires Javascript, or better still, Ajax/JQuery. With the Javascript approach you would load all users data in the module, each in their own element (for example a DIV), and display only one (set the rest to not display) then using Javascript, when you click on a link, the Javascript would display that users data element, and hide the rest. So it switches as you click the links. The bad thing is you have to load every users data in the page, which is bad for a lot of users. So the Ajax/JQuery approach would not load all users data on the page, just one, then it would get the correct user data from the database when you click on a link and dynamically populate the module with the data without reloading the page. So this Ajax/JQuery is probably the best way. You’ll have to do some research on this and get to know JQuery, its likely someone has written something similar you can adapt. I did a very quick search for you and found a similar example here

Picture of David

David 2nd January, 2012 at 18:24 pm


I am looking for a way to export the header+menu so it can be integrated on another website.

I tried the code from your previous post on Zencart but i always have a 404 error message.

And I am somehow confused with the modules, menu and not familiar with Joomla.

Do you have detailed instructions ;-)

Picture of Laurence Cope

Laurence Cope 2nd January, 2012 at 18:25 pm

I dont have detailed instructions sorry, only what's on the blog but please feel free to contact us if you would like us to investigate this for you.

Leave a Reply