Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

custom css in admin area?

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-28-2015, 07:22 AM
 
cvaughan02 cvaughan02 is offline
 

Member
  
Join Date: Mar 2014
Location: st. louis, mo
Posts: 22
 

Default custom css in admin area?

hey guys, anybody know how to add custom css to the admin area?
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS.
Reply With Quote
  #2  
Old 05-29-2015, 04:50 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: custom css in admin area?

Here is the general article about adding CSS files:
http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files

You can add a condition for admin area in the getThemeFiles() method:
PHP Code:
if (!is_null($adminZone)) 
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 05-29-2015, 06:03 AM
 
cvaughan02 cvaughan02 is offline
 

Member
  
Join Date: Mar 2014
Location: st. louis, mo
Posts: 22
 

Default Re: custom css in admin area?

Quote:
Originally Posted by tony_sologubov
Here is the general article about adding CSS files:
http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files

You can add a condition for admin area in the getThemeFiles() method:
PHP Code:
if (!is_null($adminZone)) 

that implies that without that, all the files would get added on the admin, right? my issue is that i'm not seeing my css files being added o the admin side, so i'm wondering if that method actually gets called in the admin panel.

this morning I found this in AdminPanel.php

PHP Code:
/**
     * Register CSS files
     *
     * @return array
     */
    
public function getCSSFiles()
    {
        
$list parent::getCSSFiles();

        
$list[] = 'css/admin_panel.css';

        return 
$list;
    } 

so I'm thinking maybe I can extend that to add my admin panel css.

but if you're saying that the getthemfiles() method of aview gets called in the admin area, then I dont need to do that. can you clarify?
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS.
Reply With Quote
  #4  
Old 06-02-2015, 06:27 AM
 
cvaughan02 cvaughan02 is offline
 

Member
  
Join Date: Mar 2014
Location: st. louis, mo
Posts: 22
 

Thumbs up Re: custom css in admin area?

Quote:
Originally Posted by tony_sologubov
Here is the general article about adding CSS files:
http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files

You can add a condition for admin area in the getThemeFiles() method:
PHP Code:
if (!is_null($adminZone)) 

:::Solved:::

Ok, so I fugured out the issue. In order for the css to show up in the admin area, you have to add it to skins/admin/en/modules/devid/modid/.

as I'm learning over and over, where I place my code is just as integral as the code itself.
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS.
Reply With Quote

The following user thanks cvaughan02 for this useful post:
qualiteam (06-04-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:23 PM.

   

 
X-Cart forums © 2001-2020