Как обратится к $modx из модификатора Smarty?

Ребятушки_), может кто сталкивался, нужно из модификатора Smarty «достучаться» до MODx. Я решил как-то так: Костыль в /core/components/modxsmarty/model/modxSmarty/modxsmarty.class.php ... public static $_modx; ... function __construct(modX &$modx, $params= array ()) { modxSmarty::$_modx = & $modx; ... и сам modifier.thumb.php <?php function smarty_modifier_thumb($input, $options) { $modx = & modxSmarty::$_modx; $options = explode(',', $options); return $modx->runSnippet('phpthumbof',array('input'=>$input,'options'=>join('&',$options))); } Но думаю что можно без костыля… Ваши предложения? :) PS: сей изврат нужен для красоты вида: {$Item.tv_img|thumb:'w=30,h=30,zc=C'}

Так в функции smarty получится т.к. в нее передается $smarty: <?php function smarty_function_xxx($params, & $smarty) { $modx = & $smarty->modx; ... }

точно, сорри, проглядел :) я сам просто функцию сделал, и вызываю {thumb input='image-src' options='some-options'}