Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

119 lines (83 sloc) 3.09 kb
$Id: kitt.txt,v 1.1 2010/03/19 17:43:51 yhahn Exp $
KIT Theme Specification (kitt 1.0-draft)
------------------------------------------
This document provides recommendations and requirements for Drupal themes to
ensure the compatibility of themes with kitf-compliant features.
This document is based on the Drupal 6.x versions of Drupal core, contributed
modules and themes.
1. Introduction
---------------
Drupal theme developers have traditionally looked to Garland, other core themes
and quality contributed themes to determine what elements they may or may not
provide, what the boundaries of their customization might be, and how to best
ensure compatibility with module-level functionality.
This document aims to state explicitly what some of the requirements and
recommendations are for Drupal themes with an eye toward compatibility with
kitf-compliant features.
### Declaring compliance
Themes compliant with this specification may declare themselves as such in
their theme `.info` file using the `kitt` key and the version of this document
to which they comply. Example:
kitt = "1.0-draft"
2. Regions
----------
In order to ensure interoperability with kitf-compliant features, a theme should
implement the following regions:
- `content`: The main page content region.
- `left`: The lefthand sidebar.
- `right`: The righthand sidebar.
Any number of additional regions may be implemented by a theme.
3. Page template variables
--------------------------
The page template may copy or manipulate their values as needed - the main
requirement is that the value and purpose served by each variable make it
through to the page in some reasonable fashion.
### 3.1 Required variables
The following variables must be output by `page.tpl.php` when they are not empty
on a given page.
body_classes
closure
head
head_title
language
messages
primary_links
scripts
site_name
styles
tabs
title
content
left
right
[other regions]
### 3.2 Recommended variables
The folowing variables are commonly used by site builders but may not make sense
to include in all themes.
breadcrumb
feed_icons
footer_message
help
logo
mission
search_box
secondary_links
site_slogan
4. Element attributes
---------------------
A theme may alter markup of various Drupal elements as they see fit. Certain
attributes and aspects of markup generated by key theme functions are referenced
by javascript or CSS in Drupal modules and should not be altered unless the
theme in question will provide a full replacement for the module-level
functionality.
### 4.1 theme('node')
- Must include a single root level `<div>` element.
- Must include the class `node`.
- Must include the id `node-$nid`.
### 4.2 theme('block')
- Must include a single root level `<div>` element.
- Must include the class `block` and `block-$module`.
- Must include the id `block-$module-$delta`.
### 4.3 theme('comment')
- Must include a single root level `<div>` element.
- Must include the class `comment`.
Jump to Line
Something went wrong with that request. Please try again.