Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.515 diff -u -r1.515 theme.inc --- includes/theme.inc 25 Aug 2009 15:39:13 -0000 1.515 +++ includes/theme.inc 25 Aug 2009 22:50:06 -0000 @@ -1386,10 +1386,13 @@ * @param $attributes * A keyed array of attributes. * @param $heading - * An optional keyed array for a heading to precede the links: + * An optional keyed array or a string for a heading to precede the links. + * When using an array the following keys can be used: * - text: the heading text * - level: the heading level (e.g. 'h2', 'h3') * - class: (optional) an array of the CSS classes for the heading + * When using a string it will be used as the text of the heading and the + * level will default to 'h2'. * Headings should be used on navigation menus and any list of links that * consistently appears on multiple pages. To make the heading invisible * use class => 'element-invisible'. Do not use 'display:none', which @@ -1409,10 +1412,19 @@ // Treat the heading first if it is present to prepend it to the // list of links. - if (!empty($heading['text']) && !empty($heading['level'])) { + if (!empty($heading)) { + if(is_string($heading)) { + // Prepare the array that will be used when the passed heading + // is a string. + $heading = array( + 'text' => $heading, + // Set the default level of the heading. + 'level' => 'h2', + ); + } $output .= '<' . $heading['level']; if (!empty($heading['class'])) { - $output .= ' ' . drupal_attributes(array('class' => $heading['class'])); + $output .= drupal_attributes(array('class' => $heading['class'])); } $output .= '>' . check_plain($heading['text']) . ''; } Index: modules/system/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v retrieving revision 1.31 diff -u -r1.31 page.tpl.php --- modules/system/page.tpl.php 25 Aug 2009 15:39:13 -0000 1.31 +++ modules/system/page.tpl.php 25 Aug 2009 22:28:15 -0000 @@ -156,7 +156,7 @@ @@ -195,7 +195,7 @@