From Joomla! Documentation

Revision as of 17:43, 7 September 2008 by Chris Davenport (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sets the contents of a document buffer. This will generally be the output captured from a <jdoc:include ... /> statement in the template. It will overwrite any previous contents of the buffer.


void setBuffer( $content, $type, $name )


Argument Data type Description Default
$content string The content to be put into the buffer.
$type string Renderer type.
$name string Name of the element rendered.


To set the content of the 'module' renderer called 'myname' you would make a call like this:

$doc =& JFactory::getDocument();
$doc->setBuffer( 'This is some content', 'module', 'myname' );

See also