Hey all,
Trying to figure out the best way to over-ride styles in the “View” files for EE2.0 Module development.
In 1.6.x I would have used $DSP->extra_css, but I’m not sure what the best way to accomplish something similar in 2.0 is. Hoping someone has run into this previously!
Cheers, will gladly buy someone with an answer a beer at EECI in SF if you are going!
Absolutely perfect. Thank you so much. Do you happen to know if that CP class is documented anywhere?
Lemme know if you are heading out to EECI, so I can honor that beer.
Here is one way:Or$this->EE->cp->add_to_head('<link rel="stylesheet" href="URL_TO_CSS" type="text/css" media="print, projection, screen" />');$this->EE->cp->add_to_head('<style type="text/css"> SOME CSS </style>');
I think the other thing I am going to run into here is this:
If I want to bundle the CSS file inside the module, so something like:
/system/expressionengine/third_party/module-name/module.cssWhat is the best way to set the path to this file? Initially, I would have thought to just pass it relatively from the index.php page of the Control Panel, so something like:
href="expressionengine/third_party/module-name/module.css"But, if the user installs EE above the web root, this will fail. Any thoughts? Maybe there is some kind of “path to cp” function in that CP class.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.