| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocumentRendererModule |
render |
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.
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. |
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" />