Jump to main content Jump to doc navigation

modChunk.getContent

Other versions: 3.x — Other languages: EN RU — Found a problem? Please edit this page or report an issue.

modChunk::getContent

Get the source content of this chunk.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modchunk.class.html#%5CmodChunk::getContent()

void getContent ([ $options = array()])

Example

$chunk = $modx->getObject('modChunk',array('name' => 'MyChunk'));
if ($chunk) {
  $content = $chunk->getContent();
}

See Also