We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Adding own CSS to Control Panel

Development and Programming

mark59's avatar
mark59
88 posts
15 years ago
mark59's avatar mark59

I am trying to add a small amount of CSS to the Control Panel to style a data table within the Module I am writing, and that will appear under the Control Panel.

Tried using the

$DSP->extra_css = “path/to/file.css”;

which is mentioned on the Dev page for the Display class. Does not work (my CSS file is not referenced anywhere in the CP webpage source) - any ideas? Has this ‘undocumented’ feature mentioned on the pages comments been removed? or is it wrong or not available?

I am trying to set this - just where I set the title, crumbs, etc

$DSP->title = $LANG->line('fbtcommerce_module_name'); 
        
        $DSP->crumb = $DSP->anchor(BASE. 
                                   AMP.'C=modules'. 
                                   AMP.'M=fbtcommerce', 
                                   $LANG->line('fbtcommerce_module_name')); 
                                    
        $DSP->crumb .= $DSP->crumb_item($LANG->line('view_basket')); 
        
        $DSP->extra_css = "/css/ecommercecp.css";
       
mark59's avatar
mark59
88 posts
15 years ago
mark59's avatar mark59

Been able to answer my own question

$DSP->extra_css does work - but it needs to be the Full Server Path name of the file and not relative to the website root folder.

Issue Solved.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.