Let one specify a custom assets folder

Issue #222 new
Former user created an issue

I use custom Bootstrap and Bootstrap responsive css files (with for instance 24 columns of 30px+10px for more granularity). I need to overwrite the standard boostrap css files provided by yii-bootstrap. Two possibilities: - overwrite css files in bootstrap.assets.css directory or - add my own assets and change the configuration. Because I'm very conservative, I choose the second solution. So I added bootstrap.project_name.assets folder wich is an exact copy of the bootstrap.assets folder. Then I've overwritten both bootstrap.css and bootstrap-responsive.css files with my custom builds. In my application configuration file, I have added the following line

Yii::setPathOfAlias('bootstrap.assets', Yii::getPathOfAlias('bootstrap') . '/anthropy/assets');

My idea is that it could be interesting to have a bootstrap extension option that would let one specify an alternate assets folder where, if files are found, they would overwrite the standard files distributed in the bootstrap extension.

                        'responsiveCss' => true,
            'assets' =>'lib.bootstrap.project_name.assets'

That requires to update getAssetsUrl() and register*() methods

Comments (1)

  1. Gregoire Welraeds

    I would like to stress that the ideal situation would be to register all standard files unless they are overwritten by a custom one in an separate assets folder. I believe that customizing bootstrap css file is just a common situation. I have read chris post about using less with Yii and Yii-bootstrap but could not find any tip about how to nicely manage custom css files.

  2. Log in to comment