Answer the question
In order to leave comments, you need to log in
Ajax getting a chunk with tag parsing, how?
Hello. There was a task of a not very complicated Ajax directory, with which some difficulties arose ... Namely: s7535.h7.modhost.pro
The bottom line is that for some reason almost everything is ignored in chunks except for html when an Ajax request is made.
It would seem that everything should be simple, we send a request somewhere from the form (in the example above, the request goes to ajax.php)
In the php file, a chunk request is sent, $modx->getChunk(), and only html comes in response, tags are not parsed. Tell me please, where did I mess up?
Moreover, even such work with a chunk returns only html:
$chunk = $modx->newObject('modChunk');
$chunk->setCacheable(false);
$chunk->setContent($string);
$output = $chunk->process($options);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question