modChunk.setContent
Last updated Oct 11th, 2026 | 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
$194 per month—let's make that $500!
Learn moremodChunk::setContent¶
Sets the content of this Chunk.
Syntax¶
boolean setContent ($content [, array $options = array()])
Returns true if the content was set. Inherited from modElement (core/src/Revolution/modElement.php).
Example¶
$chunk->setContent('<h2>Hello!</h2>');
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
$194 per month—let's make that $500!
Learn more










