Skip to content

Instantly share code, notes, and snippets.

@Fi1osof
Last active December 19, 2015 21:59
Show Gist options
  • Save Fi1osof/6023918 to your computer and use it in GitHub Desktop.
Save Fi1osof/6023918 to your computer and use it in GitHub Desktop.
Дефолтовый контроллер
<?php
$properties = $modx->resource->getOne('Template')->getProperties();
if(!empty($properties['tpl'])){
$tpl = $properties['tpl'];
}
else{
$tpl = 'index.tpl';
}
if ($modx->resource->cacheable != '1') {
$modx->smarty->caching = false;
}
return $modx->smarty->fetch("tpl/{$tpl}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment