cssattacher Attach CSS anywhere in your application. Render only used styles in convenient way.

  1. Requirements
  2. Usage
  3. Resources

This extension allows you to attach CSS styles anywhere you like. Just cast method to append styles global. Then script join it and register CSS file on page.

Requirements

Yii 1.1 or above

Usage

Include cssAttacher.php in your library.

$styles = array('#one'=>array('color'=>'#c00'));
cssAttacher::attach($styles);

... some code ... 
return "<div id='one'>Hello</div>";

Cast method at bottom in your layout

</html>
<?php cssAttacher::renderStyles(); ?>

Resources

2 0
3
304
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: papryk papryk
Created: Dec 11, 2012
Updated: 13 years ago

Downloads

show all

Related Extensions