Skip to content

dart-creations.com

Advertisement
Home arrow Joomla arrow Joomla Components arrow mod_html - one of the most useful Joomla modules

Print E-mail

mod_html - one of the most useful Joomla modules

Article Audience: Webmasters

The mod_html module has been described as the Joomla swiss army knife. It allows you to insert arbitrary html in any template position available.

 

The mod html module is an extremely simple module, with no limits to its use. It simply provides a wrapper for you to insert arbitrary HTML / Javascript code in your Joomla website. The great thing about it is that you are able to insert adverts or other code without having to modify your template thus you have no risk of breaking your template in some way.

  • Inserting advertising code for affiliate programs
  • Inserting code for Google Adsense
  • Inserting Javascript for generating funky menus
  • Inserting flash components

By creating a copy of the mod_html component, you can use the modules for as many links / adverts as you need! Simple go to the Module Manager Modules > Site Modules, click on a module which uses mod_html, select its checkbox and create copy in the toolbar menu, and you have a new copy to work with. Click on the copy of the mod_html , change the required parameters, change the HTML and publish. You can create as many mod_html modules as you want. By combining the use of mod_html with intelligent menu navigation, you will be able to target specific adverts to specifc pages, rather than having generic adverts all over the website.

For example in the image below we can see that for the current module, instead of selecting the All option in the Menu Items, we have created a section (with its categories as children in the menu). We then selected the Affordable Web Development (which automatically selects its children too). Thus this advert has been targeted to the current section (and its categories) only. This is great when you have different affiliates for different parts of your site. Example you have template affiliates (and you target your templates section), and other affiliates for other sections of the site (and thus target each section with its own affiliates).

Target specific pages

Inserting AdSense Code 

Lets give a short example of the use of mod_html to display AdSense code. The following is a shot of the module setup for displaying adsense code on the left side of the screen.

Inserting adsense code using mod_html

Inserting Affiliate Code

In the example below we have different code for affiliates. As can be seen on this site itself, you can see that both mod_html components can live independently of each other.

Inserting affilate code

Warning: Remember that this is a 3rd party module and may compromise your site's security. In this case the risk may be even larger because code you insert may create additional vulnerabilites. Always make sure that your code comes from a trusted source.

Comments
Add NewSearchRSS
Denis - Great module thanks IP:216.104.204.254 | 2007-05-29 05:10:17
This module is great and answeres my prayer to be able to dispaly codes where I want.
Seyfullah Ural - Great But IP:85.104.67.227 | 2007-06-11 14:26:49
It is indeed a very useful module but the code to be entered must be 1-line. Otherwise module will insert tag to the end of each line.
Denis - mr IP:217.172.18.83 | 2007-07-24 05:57:05
is great
Jorge - How to show in the FrontPage? IP:201.222.118.154 | 2007-11-15 07:16:48
The module works fantatic, but what I have to do if I want to show in the front page some custom's code.

Thanks for advance.
DART Creations - Show in Frontpage IP:85.232.198.118 | 2007-11-21 15:09:44
Jorge, what I do in this case is I create my own position in the template and put it where you want to show the custom code.

Then create a copy of this module, assign it the module position you created and as parameters where to show it select only the frontpage.

If you have problems created a module position in your template, I have a good article on module positions under Joomla tutorials.
Kherlen - Thank you IP:71.30.164.126 | 2007-12-11 05:52:57
Thank you sooooooooo much, I have been struggling with the third party codes. Thanks, keep up the good work!!
Manny - Thanks IP:210.213.144.207 | 2008-05-06 18:22:40
This module is indeed very useful in my joomla site.
Write comment
Name:
Title:
Security Image
 

Subscribe to our feed


RSS Feed

DART Creations - Joomla Tutorials, Tips and Tricks and more...

Joomla Tips

DART Creations Joomla Tips, Tricks, tutorials and general Joomla help

Sponsors

Buy us a beer!

Lots of time and effort goes into creating and maintaining this site. If we've helped you, consider buying a beer. It will inspire us to keep on giving! Thanks! (€3)






Cheers ;)