官术网_书友最值得收藏!

  • Drupal 6 Theming Cookbook
  • Karthik Kumar
  • 350字
  • 2021-04-13 16:56:41

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.
    How to do it...

    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.

主站蜘蛛池模板: 瑞金市| 文安县| 台北县| 旌德县| 松原市| 淳化县| 大方县| 桐庐县| 白银市| 仁寿县| 双柏县| 将乐县| 华亭县| 广州市| 诸暨市| 凤山县| 香港| 山阳县| 宁津县| 瓦房店市| 油尖旺区| 凌源市| 洛宁县| 江门市| 岑溪市| 井陉县| 金寨县| 稻城县| 岑溪市| 青河县| 镇宁| 苗栗市| 溧水县| 安国市| 雅安市| 蒲城县| 开平市| 射阳县| 巴里| 理塘县| 永仁县|