В Smarty в {extends ....} можно использовать перем
Jan 12, 2015
В Smarty в {extends ....} можно использовать переменную, примерно так:
{extends $modx->layout}
а $modx->layout можно где-нибудь определить скажем в modxsmarty.class.php в конструкторе:
...
...
function __construct(modX &$modx, $params= array ()) {
parent :: __construct();
$this->modx= & $modx;
$this->modx->layout= $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest' ? "layout.tpl" : "<strong>empty_layout.tpl</strong>";
...
...