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 followers
304 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: papryk
Created on: Dec 11, 2012
Last updated: 5 years ago

Downloads

show all

Related Extensions