CHUNK Binding
Last updated Sep 2nd, 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
$204 per month—let's make that $500!
Learn moreWhat is the @CHUNK Binding?¶
The @CHUNK Binding returns the parsed content of any specified Chunk when @CHUNK is used in a Template Variable (TV).
In other words, if @CHUNK Hello is the value of a TV called MyChunk, the following tag in a Template or in the Resource Content field of a Resource will be replaced with the contents of the Hello chunk:
[[*MyChunk]]
Syntax¶
@CHUNK chunk_name [properties_as_json]
Binds the variable to a Chunk. chunk_name is the Chunk name. The returned value is the parsed Chunk output.
Optional JSON properties (MODX 3.0+) are passed to getChunk() as the Chunk placeholders / properties array.
Usage¶
@CHUNK MycontactForm
With properties:
@CHUNK MycontactForm {"submitLabel":"Send","showTitle":"1"}
Invalid JSON after the Chunk name is logged as an error and ignored; the Chunk still runs without those properties.
This binding is similar to the @RESOURCE binding, except it binds the TV to a Chunk. For running PHP, use @SNIPPET instead.
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
$204 per month—let's make that $500!
Learn more










