modChunk.getContent
Last updated May 23rd, 2021 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn moremodChunk::getContent¶
Get the source content of this chunk.
Note that content will contain raw tags, what to do with them further you can read on Parsing MODX Tags page.
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¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn more