How to include modules in Section/Content Description (for Joomla 1.0.x)?
Written by kksou   
Sunday, 20 April 2008

This is in response to Filipe Torres's post titled "How to include modules in section/category description".

The standard mosloadposition plugin that comes bundled with the original Joomla 1.0.x installation only allows you to embed modules in content items.

This article shows you how to embed modules in Section/Category description. You can see a live example here.

Solutions

  1. Download and install. First you need to download and install the plugin loadmodule for Section/Category Description.

  2. Publish the plugin. Go to Mambots - Site Mambots and make sure the plugin is published.
  3. Add Trigger. In the original Joomla installation, there is no trigger during the display of Section/Category description. When there is no trigger, none of the mambot or plugin gets called. In order for Joomla to call the new plugin that we have just installed to include a module, we need to add a trigger.
    1. Go to the folder <Joomla root folder>/components/com_content, you will see a file called content.html.php.
    2. Open this file content.html.php in your favorite editor.
    3. Go to around Line 28. In the function showContentList(), add the three lines highlighted in yellow to the start of the function as follows:
    4. class HTML_content {
          /**
          * Draws a Content List
          * Used by Content Category & Content Section
          */
          function showContentList( $title, &$items, &$access, $id=0, $sectionid=NULL, 
              $gid, &$params, &$pageNav, $other_categories, &$lists, $order, 
              $categories_exist ) {
      
              global $_MAMBOTS;
              $_MAMBOTS->loadBotGroup( 'content' );
              $results = $_MAMBOTS->trigger( 'onBeforeDisplayTitle', array( &$title) );
      
              global $Itemid, $mosConfig_live_site;
      
              if ( $sectionid ) {
                  $id = $sectionid;
              }
      
    5. Save and close this file.

  4. That's it! You can now include a module inside a Section/Category description using the same method as outlined in How to include modules in Content item (for Joomla 1.0.x).


User reviews

There are no user reviews yet.

Note: You have to be a registered member to leave a comment. Free registration here.

 
< Prev   Next >

Copyright © 2006-2008. kksou.com. All Rights Reserved