[[+content_image]]
6
6
655362014-11-10 17:19:01
MODX
65536, 2014-11-10 17:19:01

How to make MODX parse snippets in a chunk when calling getChunk?

A simplified example
$output = $modx->getChunk('abc');
in the abc chunk, let's say the following:
<b></b>
as a result, we have <b></b> in the $output variable. At the same time, chunk tags are parsed, but snippet tags remain raw. What to do?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
I
ilyautkin, 2015-01-30
@ilyautkin

Since the snippet is not cacheable, the MODX parser saves it for last. Try calling it without an exclamation mark (cached).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question