Support Joomla!

references:joomla.framework:document:jdocumentrenderermodule-render

Table of Contents

render

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Document Class JDocumentRendererModule Method render Reference render() Never Work in Progress

Renders a module script and returns the results as a string.

If the module is cachable and and caching is enabled, the output is retrieved from the caching layer. Otherwise, the JModuleHelper::renderModule() method is used to render the module.

The method returns the rendered module.

Syntax

string render ( $module, $params, $content )

$module string is a string containing the name of the module to be rendered.
$params array is an associative array of parameter values that get passed to the module.
$content string is a string that overrides the module output. If this parameter is not null, it is used as the renderer output. Otherwise, the method will invoke the module to render its output.

Examples

Example

$document =& JFactory::getDocument();

jimport( 'joomla.document.renderer' );
jimport( 'joomla.document.html.renderer.module' );
$renderer = new JDocumentRendererModule( $document );
echo $renderer->render( 'online' );

might produce:

Result

1 <img src="images/users.png" align="middle" alt="Users Online" />

Discussion

Full name:
E-Mail:
 
references/joomla.framework/document/jdocumentrenderermodule-render.txt (544 views) · Last modified: 2007/08/15 15:03