API:getChunk
From MODx Wiki
API Function Definition:
getChunk
- Versions
- > 0.9.2
- Return Values
- Success: Output of a given Chunk
- Fail: empty string (or false?)
- Data Type
- string
- Object Hierarchy
- DocumentParser
string getChunk(string $chunkName);
Retrieves a chunk from the database (or cache) given the name of the chunk.
[edit]
Examples
$chunkOutput = $modx->getChunk("chunkName"); echo $chunkOutput;
