Question

I'd like to style some components differently in the admin. How could I generate a unique id/class on the body element so I could style admin elements separately?

Was it helpful?

Solution

You can start by looking at the admin module. It helps you to create an admin theme and other AI improvements. I found that using the rubik theme.

You can also just put a class on admin pages, by checking the first argument in a preprocess function. For all admin pages they the first arg should be admin. The preprocess function should be in your theme's template.php file, and named according to your theme's name.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top