Module Theming


I’m writing a module which contains some themes, but I’m having troubles in displaying themes’ images.

Since the module is in the protected/ dir it’s unacessible due to .htaccess.

So the proper way to make those files available is



and works. The problem now is that "file.css" contains references to images (as most themes), but these are still in protected and this not accessible by the browser!

How can I manage this?


hi don’t you save your themes under themes/admin or something similar will make your life easy


this might help you

I want to keep the module self contained so I want to keep the files in modules/

Thanks for the links but provide generic info’s, not much about this specific issue

Maxxer since you dont wanna change you themes directory may this article will help you take a look

indeed this was the solution!

I moved all my js+css+img into assets, registered assets and then the scripts+css from there.


glad to help – yii is great