• Home
  • Episode Guide
  • Blog & Tutorials
  • Contact

Using HTML or Javascript in a Module

Monday, 04 August 2008 11:26

Attention: open in a new window. E-mail

Share/Save/Bookmark

If you hang out in the IRC channel for Joomla, you'll often see Dr. Digital hanging out there. He's a good guy to get help with Joomla—just make sure your site is updated before you do! Anyways, I was reading his website and he has an article about using HTML and Javascript with modules. Dr. Digital recommends using the "No Editor" option when creating a module that contains HTML or Javascript. It can be a real pain to switch back and forth between No Editor and the JCE Editor, however. Here's a better way:

When would I use a module with HTML or Javascript?

Usually when a module is created with text or graphics of your own design, using the type "Custom HTML" works just fine. However, if you are using code snippets given to you by other sites, especially those like Amazon, Google Adsense, and others, "Custom HTML" often doesn't work, and you'll get frustrated really quickly!

Okay, so what's the solution?

The quick fix is pretty easy: download a third party module that will let you insert plain HTML and/or Javascript. Check out the category Custom Code at the Joomla Extensions Directory. The one I'm using is called MoeDesigns - AnyCode - Joomla 1.5 Native, but there are a number of extensions that do pretty much the same thing.

This is what AnyCode looks like:

It's a little hard to make out, but all you have to do is paste your code into the "Module Parameters" field. Give it a title, set the position, and you're done.

This is exactly what I do to run the Amazon recommendations on the site.

Bookmark
Email This
Trackback(0)
trackbackTrackBack URI for this entry
Comments (0)add
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
Get plugged into Joomla!
Subscribe free with:

Subscribe in iTunes

OR

podcaster76x76

Subscribe to the blog

via RSS

or via email:

Follow The Joomla Podcast on Twitter

twitter

Latest Blog Posts

  • New episodes coming soon
  • Learn more about Joomla 1.6
  • Joomla + Youtube
  • Joomla 1.6 Alpha Released
  • Sorry for the duplicates

Buy me a cup of coffee?

Categories

  • Free Joomla Tutorials
  • Joomla News

Need to get a message out to the Joomla Podcast community?

The Joomla Podcast is currently accepting sponsorships on both the website and podcast. Please contact us for pricing and layout options. Reach your audience with us!

The Joomla Podcast Recommends:

Joomla A Users Guide
Great resources to get up and going with Joomla!

Need to upgrade your template?

Template design by Witty Monkey © (c) 2009 - 2010 Joomla Podcast