Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Drupal 6 Theming Cookbook

You're reading from   Drupal 6 Theming Cookbook Over 100 clear step-by-step recipes to create powerful, great-looking Drupal themes

Arrow left icon
Product type Paperback
Published in Nov 2010
Publisher Packt
ISBN-13 9781847198686
Length 384 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (18) Chapters Close

Drupal 6 Theming Cookbook
Credits
About the Author
About the Reviewers
1. Preface
1. Drupal Theme Basics 2. Beyond the Basics FREE CHAPTER 3. Custom Themes and Zen 4. Templating Basics 5. Development and Debugging Tools 6. Advanced Templating 7. JavaScript in Themes 8. Navigation 9. Form Design 10. Customizing CCK 11. Views Theming 12. Rapid Layouts with Panels Index

Displaying a different theme for administration


This recipe describes how to set up Drupal to use a different theme only for administration pages. This is a frequent requirement especially on brochure sites which have a limited number of regions where blocks can be placed, or have missing page elements such as breadcrumbs which reduces usability. Having a separate administration theme also comes in handy during custom theme design as the site could well be largely unusable during the initial stages of development. A stable administration interface will therefore ensure that administrative tasks can still be performed effortlessly until the new theme becomes ready.

Getting ready

Depending on the amount of real estate required, it will be worthwhile to put some thought into deciding on the right theme to use as the administration theme. Themes such as the aptly named Administration theme (http://drupal.org/project/admin_theme) and RootCandy (http://drupal.org/project/rootcandy) have been designed specifically with the administration pages in mind. That said, if the requirement is temporary, using a core theme such as Garland will usually suffice.

How to do it...

Specifying an administration theme can be done by following these steps:

  1. Navigate to admin/settings/admin (Home | Administer | Site configuration | Administration theme).

  2. Choose Garland (or any other theme of choice) in the Administration theme drop-down list.

    In situations where only administrators have permissions to add and edit content, it might be handy to also check the Use administration theme for content editing checkbox seen in the previous screenshot.

  3. Click on the Save configuration button to save our changes in the database.

Viewing an administration page should confirm that the specified administration theme is being used in preference to the default theme.

How it works...

Every time a page is displayed, Drupal checks to see if the URL of the page begins with admin. If it does, and if we have specified an administration theme, Drupal overrides the default theme being used with the specified theme.

Tip

Since the administration theme is something of a special case, Drupal does not require the theme to be enabled for it to be available as an option.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image