How To Use Bootstrap Pre-Made Themes With Yii?

Hello All!

I’ve recently started with Yii and I’m interested in using some of the ready made bootstrap themes that are available on the web. I’ve downloaded Yii-bootstrap, and I’ve already implemented some themes that are directly compatible with Yii (i.e. Hebo, Blackboot, etc.). I know that there are a lot of gorgeous themes out there to use for bootstrap in general, what are the steps to convert one to a format that they could become a “theme” with Yii?

Thank you personally!

One way is to use asset bundles combined with view layouts. Have a look at AppAsset.php that comes with the default advanced app (in frontend/assets folder). You register your assets (CSS + JS) within this and this is called in your view layout file. Setup the sequence right - e.g. default bootstrap assets first and then your theme assets. You could style the location of navbar, body, etc. in your view layout.

Each of these could be combined into a theme folder/directory and distributed, and instructions mentioned for each user to setup this theme in his/her yii config file.