diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index c59246c3..0baaafa2 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -337,6 +337,22 @@ class TClientScriptManager extends TApplicationComponent /** * Registers a CSS file to be rendered in the page head + * + * The CSS files in themes are registered in {@link OnPreRenderComplete onPreRenderComplete} if you want to override + * CSS styles in themes you need to register it after this event is completed. + * + * Example: + * <code> + * <?php + * class BasePage extends TPage { + * public function onPreRenderComplete($param) { + * parent::onPreRenderComplete($param); + * $url = 'path/to/your/stylesheet.css'; + * $this->Page->ClientScript->registerStyleSheetFile($url, $url); + * } + * } + * </code> + * * @param string a unique key identifying the file * @param string URL to the CSS file * @param string media type of the CSS (such as 'print', 'screen', etc.). Defaults to empty, meaning the CSS applies to all media types. |