Okay, while I love to write about baseball, occasionally I need to write about something technical. And I just can’t seem to find a good tutorial or document for WordPress Developers trying to work with Joomla Templates. They just treat the problem so very differently. I’m not going to waste time with the basics like CSS and HTML – and I am by no means an WP or Joomla expert. But this is what I learned.
With wordpress, you can use a combination of plugins and templates to do anything you want. Templates hold the layout, and word press php functions call various WordPress functions to load the templates up with Content.
On the plugin side, you have the notion of events you can “hook”. When WP gets so far in rendering a page, it will call one of your functions to do some additional work. A real common technique is to hook the “add_content” event with a custom function and scan the content for a key words embedded in the post or page and replace those keywords with your stuff.
Joomla behaves differently. With Joomla, templates define the layout of MODULES. Modules can appear anywhere on a page, Components can only appear in the content area of a page. Joomla uses custom tags like in the template to indicate where content will be displayed. Then, in the administrative portion of the tool, you can assign modules to the “names” or positions defined in your Template. Typically the JDOC tags are enclosed in DIV’s (overlays) that are formatted with CSS.
This gives Joomla a LOT of flexibility, but can also make it a real pain to track down where something is being rendered when you try to edit an existing template. The HTML / CSS you may need to edit most likely is NOT in the template, but in one of the Module files. But which one?
As an example, I wrote a simple Hello World template. Basically, it printed Hello Sno! whenver it was called. I had to:
- Install it
- Activate it.
- Assign it to a position.
![]()
The code for the plugin (1.5) was simple.
There were 6 files in the plugin and two of them were dummy stubs just to keep people from browsing the directory. It’s a nice trick.
Insert a dummy index.html in any directory you don’t want people to browse!
So the key files were:
- helper.php — contains helper logic.
- mod_sno.php — Implements module interface.
- mod_sno.xml — tells joomla how to load it and use it.
- tmpl/default.php — how to render the module data
Okay, this is a drag. I didn’t have a code plugin for wordpress and the filtering software wiped out my original code. I reinstalled joomla and lost my plugin. I know I’ll need to do this again soon so I’ll try to repost the source. But the big thing I want to capture is the idea that WordPress operates off of hooks – in the WordPress “loop”. Joomla works differently, modules are activated and then need to be placed into an area of the template for display.