Skip to content

Instantly share code, notes, and snippets.

@argnist
Created April 7, 2014 07:35
Show Gist options
  • Save argnist/10016149 to your computer and use it in GitHub Desktop.
Save argnist/10016149 to your computer and use it in GitHub Desktop.
Вывод содержимого чанка, например в Ajax.
if (!$modx->resource) {
$modx->resource = $modx->newObject('modResource');
$modx->resource->set('id', 5);
$modx->resource->set('pagetitle', 'isAPI');
$modx->resource->set('content', $modx->getChunk('Film.Search.Results'));
}
$modx->getResponse();
$modx->response->outputContent();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment