function drupal_region_class

drupal_region_class($region)

Provides a standard HTML class name that identifies a page region.

It is recommended that template preprocess functions apply this class to any page region that is output by the theme (Drupal core already handles this in the standard template preprocess implementation). Standardizing the class names in this way allows modules to implement certain features, such as drag-and-drop or dynamic Ajax loading, in a theme-independent way.

Parameters

$region: The name of the page region (for example, 'page_top' or 'content').

Return value

An HTML class that identifies the region (for example, 'region-page-top' or 'region-content').

See also

template_preprocess_region()

File

includes/common.inc, line 4066
Common functions that many Drupal modules will need to reference.

Code

function drupal_region_class($region) {
  return drupal_html_class("region-$region");
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_region_class/7.x