Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom CSS in Expression Engine Module

I'm working on an Expression Engine module and would like to have some custom CSS in the control panel just for my module. I really don't want to have to use a theme and an override.css file. I also wanted to separate the CSS and did not want to have to place it in an '$this->EE->cp->add_to_head()' call. Is it possible to place it in a file in my module folder like the view and js files?

like image 272
Adam Christianson Avatar asked Dec 12 '22 20:12

Adam Christianson


1 Answers

Yup. Put it in /third_party/my_module/css/my_styles.css, then in your view file call:

$this->EE->cp->load_package_css('my_styles');
like image 73
Derek Hogue Avatar answered Dec 27 '22 06:12

Derek Hogue