Support Joomla!

references:joomla.framework:application:jmodulehelper-getmodule

Table of Contents

getModule

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JModuleHelper Method getModule Reference getModule() Never Work in Progress

Get a module by name

Syntax

object &getModule ( $name )

$name string The name of the module w/o the ‘mod_’ prefix

Examples

Example

$module = &JModuleHelper::getModule('banners');
echo JModuleHelper::renderModule($module);

The example might render the following HTML snippet:

Example output

  <div class="bannergroup">
    <div class="banneritem">
      custom banner text
    <div class="clr"></div>
    </div>
  </div>

This is essentially the same as using <jdoc:include type="module" name="banners" style="none" /> in the site template.


 
references/joomla.framework/application/jmodulehelper-getmodule.txt (7069 views) · Last modified: 2007/08/15 14:49