How to call a custom html module within a Joomla component.

Today I needed to render a Custom HTML module within a Joomla Component I'm currently writing.
After some research and testing this seems to be working great for me:
   $mod = &JModuleHelper::getModule('custom', 'Custom HTML'); echo JModuleHelper::renderModule($mod);

I have this piece of code in my default.php file within my views/default/tmpl/ folder. The 'custom' refers to the module mod_custom and 'Custom HTML' specifies which of the mod_custom modules to call.

Lets say you have a Custom HTML module with the title MODULEA and one with the title MODULEB then you can call and render them this way:
    $mod = &JModuleHelper::getModule('custom', 'MODULEA');
    echo JModuleHelper::renderModule($mod);
    $mod = &JModuleHelper::getModule('custom', 'MODULEB');
    echo JModuleHelper::renderModule($mod);
A couple of important notes:
  • At the time of writing I'm using Joomla 1.7
  • The modules HAS to be published.
  • It needs to be assigned to the pages/menus you want it to display.
Add a comment

Using the PHP Form Builder Class (PFBC) within your own Joomla Component.

I was in the need of professional forms for a Joomla component I'm currently writing. With "professional" I mean the forms have to look professional and also need to be validated in a professional maner. I first went through a lot of Javascript/CSS solutions where in the back of my mind I thought I still have to validate all input on the Server level (Within the Joomla component itself) Finally I found an actively maintained Forms Library that after some testing I found works great within any Joomla Component. Here are some basic notes on how I accomplished this: 

Add a comment

Read more ...

Handler : Shared memory (Apc)
Cache hits : 0 [N/A]
Cache misses : 0 [N/A]
Cache total : 0
Url added to cache : 0



Misses list