Theming overview

A few handbook pages has been moved to the new theming handbook. A fresh start for Drupal 6 and beyond. This handbook will eventually be part of a sub-section of the new outline after it has been cleansed out. The theme upgrade guide has been moved too.

Note: this page describes the theme system from a themer's perspective. If you are a module coder looking to make your module themable, you should read this page.

Creating a screenshot for the administration page

Note: There is a separate page on this for Drupal 7: http://drupal.org/node/647754

Every theme for 4.5+ needs a screenshot in the form of a screenshot.png placed in the theme directory. These are displayed in the theme listing within a Drupal installation (i.e. at Administer > Site building > Themes in Drupal 5 or 6). It is best that screenshots are consistent. The guidelines for core theme screenshots are (starting from a blank Drupal site):

  1. Log in as the first user.
  2. Enable the following modules, for some extra menu items: aggregator, blog, node, search and tracker.
  3. Turn on the features that the theme supports (logo, site name, slogan, search box). Add some primary and secondary links if needed. We suggest "Link 1" "Link 2" "Link 3", you can link them to e.g. "user/1".
  4. Set the site name to Drupal and slogan to Community Plumbing.
  5. Create the following article node:

    Donec felis eros, blandit non

Drupal's menu building mechanism

(Note: this is an analysis of the menu building mechanism in pre-4.5 CVS as of August 2004. It does not include menu caching.)

This continues our examination of how Drupal serves pages. We are looking specifically at how the menu system works and is built, from a technical perspective. See the excellent overview in the menu system documentation.

Ping: notify services of changes

The Ping core module is useful for notifying interested sites that your site has changed. It automatically sends notifications (called "pings") to the pingomatic service to tell it that your site has changed. In turn pingomatic will ping other services such as weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.

The ping module requires cron or a similar periodic job scheduler to be enabled.

You can:

Tracker: viewing new and updated content

The Tracker core module displays a site's most recently added or updated content. The Tracker module also provides user level tracking, which allows you to follow the contributions of specific authors.

The Recent content page in Drupal 7 (or Recent posts page in Drupal 6) at http://example.com/tracker is available via a link in the default Navigation menu block when the Tracker module is enabled - and the View named 'Tracker' is enabled. Menu items can be administered on the Menus administration page at http://example.com/admin/structure/menu (Administer > Structure > Menus) in Drupal 7, and http://example.com/admin/build/menu (Administer > Site Building > Menus) in Drupal 6.

The Recent content page contains a reverse chronological list of new and recently updated content. The list displays the content type, the title, the author's username, how many comments that item has received, and when it was last updated. Updates include any changes to the text, either by the original author or someone else, as well as any new comments added to an item. A red "new" will display beside the name of each node the current user has not yet navigated to. The My recent content tab on this page limits the list to the currently logged-in user.

Path: readable URLs

The core Path module lets you optionally create URL aliases for your Drupal pages. By default, Drupal automatically creates web addresses like http://www.example.com/?q=node/67, which are not user- or search engine-friendly. Search engines will give better rankings to pages that have more human-friendly URLs, especially if they include relevant keywords - for instance, http://www.example.com/?q=all-about-tarantulas.

Uses

As an administrator you can :

  • Set the path for an individual node with the Path module (on the node/add or node edit form).
  • Add a URL alias at Administer > Configuration > Search and metadata > URL aliases in Drupal 7, Administer > Site building > URL aliases > add alias in Drupal 6.
  • Administer the list of URL aliases at Administer > Configuration > Search and metadata in Drupal 7; Administer > Site building > URL aliases in Drupal 6.

When combined with using Drupal's "Clean URLs" feature http://www.example.com/?q=all-about-tarantulas becomes www.example.com/all-about-tarantulas, which is the ideal readable form.

Some examples of URL aliases:

  • image/tid/16 => store

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x