Please upgrade here. These earlier versions are no longer being updated and have security issues.

I would like to create an Admin theme

xm1xm1 New
edited December 2015 in Vanilla 2.0 - 2.8

Is it possible to change the default admin theme in vanilla? If yes, I need a basic guide on how to create an admin theme. Please.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Yes.

    Place a file called admin.css in your theme's design folder and it should be loaded automatically in the dashboard.

    Don't have a custom theme yet? Copy the folder /themes/default and rename it. Then edit the /themes/yourtheme/about.php file. You need to place the folder name (case-sensitive) as the key in the info array. I.e. `$ThemeInfo['yourThemeFolderName']. Everything else in the info array is informational at this point.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    whu606xm1
  • Thanks @hgtonight
    Can I also override admin views? How?

  • hgtonighthgtonight ∞ · New Moderator

    Exact same process as a front end view. Find the view file you want to override, copy it in to your theme folder, and change it.

    E.g. to override the applications settings view. Copy /applications/dashboard/views/settings/applications.php to /themes/yourtheme/views/settings/applications.php. Edit the newly copied file and the framework should load that instead.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    xm1
  • Great! Thanks @hgtonight

    hgtonightthathumanistguy
  • hgtonighthgtonight ∞ · New Moderator

    @xm1 Just a word of caution. Many plugins rely on specific classes or markup existing to work properly. Only override views if absolutely necessary and be prepared to do integration work with plugins that don't seem to work.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Noted. Thanks agian @hgtonight

  • LincLinc Director of Development Detroit Vanilla Staff

    Other thing to know is: The Dashboard is about to get redone from scratch in 2.3 for spring which is absolutely going to break any existing admin themes. This is an incredibly inopportune moment to do this.

  • xm1xm1 New
    edited December 2015

    @Linc I'll be ready to rework my admin theme when the time comes.

  • View override really should be avoided. I spend a lot of time stripping themes of view overrides for clients as the make updating problematic.

    Dashboard is an area few people see so admin themes aren't really something people consider important.

    grep is your friend.

  • hgtonighthgtonight ∞ · New Moderator

    @x00 said:

    Dashboard is an area few people see so admin themes aren't really something people consider important.

    I would like this to change. At the very least, a simple color change to go along with the frontend theme would make administration a lot less jarring.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • you could do away with an admin style altogether, only if it gets totally messed up, it is nice having something you can actually use.

    grep is your friend.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I created several admin themes to match my main theme. Vanilla Grape and Yellow have one. I recommend you use customadmin.css instead of admin.css to name the file and then put it in your theme design folder.

Sign In or Register to comment.