Understanding MODx Chunks

< ‌ index Snippets >

Chunks are useful for reusing blocks of code or HTML to your sites. Chunks cannot contain any logic directly, although they can contain calls to Snippets that do contain logic.

Usage:

{{chunkName}}

Chunks can also be manipulated by the MODx API:

Usage:

$modx->getChunk('chunkName'); $modx->putChunk('chunkName');
< ‌ index Snippets >