Use 1 theme for admin, another for public site

willdashwood - November 29, 2005 - 18:17

I'm testing out using Drupal to allow me to create and manage basic web brochures, particularly when there are many pages involved. I was wondering if I could configure Drupal to show 1 theme for the main site and another theme for anything under /admin. This would make theme development a lot easier as I wouldn't have to bother with formatting the admin area. Is it easy to do?

Many thanks!

This workaround is very easy

laura s - November 29, 2005 - 22:56

It's not a separate theme, per se, but it's a way to have a different admin area:

In your page.tpl.php file (assuming you have a phpTemplate theme, though I would imagine this would work for any theme), insert the following code:

<?php
if (arg(0)=="admin") { include('page-admin.tpl.php');
return;
}
?>

Insert it on the same line as the doctype code currently in your template. No spaces, no returns before the doctype or this won't work.

Then you can create the page-admin.tpl.php file with different tags or different layout, whatever.

Laura
===
pingVisionrare patternscattered sunshine

Thanks

willdashwood - November 30, 2005 - 09:46

I'll give that a try.

sections module

der - November 30, 2005 - 15:28

That's the purpose of the sections module. It allows you to define as many sections as you want for your site and assign a different theme for each section.

Also, a couple of other posts discussing simliar ideas.

http://drupal.org/node/37102
http://drupal.org/node/37828
http://drupal.org/node/37925

Cheers

willdashwood - December 1, 2005 - 10:15

I'll give that 1 a try although I did have success with the other method.

Try civicspace theme

behindthepage - December 1, 2005 - 11:33

the Civicspace theme has a different theme for the admin area.

gpdinoz
"If you're not getting the answers you want maybe you're asking the wrong questions"

Different theme for Admin

musa_bd - October 2, 2009 - 05:52

No need to change any code, there is a setting in admin, see here
http://drupal.org/project/admin_theme

kodegeek
Web Application Developer
========================
http://kodegeek.wordpress.com

 
 

Drupal is a registered trademark of Dries Buytaert.