Customizing Admin theme without hacking files

  Previous article Next article  

Customizing Admin theme without hacking files

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.5
  Last updated: 22-11-2017
  Comments: 0
  http://cms.ms/8OnM

If you want to make small changes to the default CMSMS Admin theme, you can change the core stylesheet files with the risk of overwriting it when upgrading the CMS. But creating a custom Admin theme might be a bit of an overkill for a few changes... CMS Made Simple™ has a - not very well-known - feature for doing this without any risk! With this feature you can simply override the default Admin stylesheet declarations.

At one of my websites I have several sub domains with each its own CMS. Being afraid of making changes to the wrong website I wanted to make some layout adjustments to remember me in which website I am working. The example I will show you here is changing the default CMSMS logo with one of my own.

  How to use

Create a new folder at the webserver: website.com/admin/themes/OneEleven/extcss/
and in this new folder you create a new file named style.css with the content:

header .cms-logo img { display: none }
header .cms-logo { background: url(../uploads/_template/your-logo.png) no-repeat 10px 0 }

In the uploads folder (or in any other folder you want, just change the path in the stylesheet) you can add your own image file. The file should be a (transparent) image with a maximum height of 69px! The default image is 205px wide, but you can make it smaller or wider if you want...

Beside this example you can add all CSS declarations from the regular /css/style.css file here to change the styling of the Admin theme to your liking.



  Working example

Default CMSMS Admin logo Custom CMSMS Admin logo



CMS Made Simple 2.2.5 - Tutorials, tips and tricks - CMSMS 2.2.5

Customizing Admin theme without hacking files

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.5
  Last updated: 22-11-2017
  Comments: 0
  http://cms.ms/8OnM