1

I disabled core css file because it was intercepting with my custom css files:

$cs = Yii::app()->getClientScript();
$cs->scriptMap = array(
    '*.css' => false,
);

Now, I need core css files in one view only.

Is there anyway to include those core css files in one view?

2
  • you can use register package, to include core css, use registerPackage() on particular page,,, make a core Css package Commented Jul 24, 2014 at 5:45
  • are you talking abt ..... screen.css, print, ie, main, form css files ....? Commented Jul 24, 2014 at 5:49

1 Answer 1

1

You can do it like this

In config/main.php under components section

  'clientScript'=>array(
        'packages'=>array(
            'CoreCss'=>array(
                 'baseUrl'=> 'css/' ,
                  'css'=>array('main.css','ie.css','form.css','screen.css','print.css'),
            ),
        ),

In any page you want to register this css use below lines..

 $cs = Yii::app()->clientScript;
 $cs->registerPackage('CoreCss');

may be this things can help you...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.