Thursday, March 29, 2012

Using Packages with the clientScript Component

With the advent of Yii 1.1.10 the package manager of the CClientScript became even more powerful with the ability to dynamically add packages to the list and chain the return value.

If you're not familiar with using packages, I will run through it very briefly. The Class reference for the CClientScript can be found here: http://www.yiiframework.com/doc/api/1.1/CClientScript

Most people who have used Yii for a while are quite familiar with using the clientScript component to dynamically add CSS and Javascript files to the page headers, so lets start there.