A
A
AliasNameless2019-05-20 10:57:46
MODX
AliasNameless, 2019-05-20 10:57:46

How to make $chunk->process work recursively?

Good day! This code correctly inserts placeholder values ​​into $content. However, if there is a call to another snippet, then it is ignored ...
The task is to process $content according to all modx rules.

$uniqid = uniqid();
$chunk = $modx->newObject('modChunk', array('name' => "{tmp}-{$uniqid}"));
$chunk->setCacheable(false);
$chunk->setContent($content);
$CSSoutput=$chunk->process($scriptPtoperties);
$modx->regClientStartupHTMLBlock($CSSoutput);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question