diff --git a/src/Tales.php b/src/Tales.php index 5937db2..7cbd91c 100644 --- a/src/Tales.php +++ b/src/Tales.php @@ -51,7 +51,7 @@ class Tales { return date("H:i", $e); } - static function phptal_asset($s) { + static function phptal_asset($s) { self::$site->addStyleSheet($s); return ""; } @@ -59,7 +59,7 @@ class Tales { /** * Функция подключения компонента */ - static function phptal_component ($expression) { + static function phptal_component($expression) { $begin = floatval(microtime(true)); $component/*: Component*/ = null; diff --git a/src/View/View.php b/src/View/View.php index 088cd43..a30e9fa 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -15,8 +15,9 @@ class View protected $_title = null; // Заголовок текущего шаблона - public $active_module; - public $module_action; + public $active_module; + public $module_action; + public $prefix; public $suggestions; //подсказки @@ -59,7 +60,7 @@ class View */ public function addScript($name) { - $output = $this->resolveName($this->alias, $name); + $output = $this->resolveName($this->alias, $name . '?' . http_build_query($this->prefix)); $this->_script [] = $output; } @@ -77,6 +78,10 @@ class View } } + public function setPrefix($name, $val) { + $this->prefix[$name] = $val; + } + /** * Добавляет стили к текущему шаблону * @@ -84,8 +89,8 @@ class View */ public function addStyleSheet($name) { - $output = $this->resolveName($this->alias, $name); - $this->_stylesheet [] = $output; + $output = $this->resolveName($this->alias, $name . '?' . http_build_query($this->prefix)); + $this->_stylesheet [] = $output; } /**