You are here

function themekey_path_themekey_properties in ThemeKey 7.2

Same name and namespace in other branches
  1. 7.3 modules/themekey.path.inc \themekey_path_themekey_properties()

Implements hook_themekey_properties().

Provides additional properties for the ThemeKey module:

  • path:node_alias

Return value

array of themekey properties and mapping functions

File

modules/themekey.path.inc, line 21
Provides some ThemeKey properties related to the path module.

Code

function themekey_path_themekey_properties() {

  // Attributes of properties
  $attributes = array();
  $attributes['path:node_alias'] = array(
    'description' => t('Path: Node alias - The path alias assigned to a node.'),
    'validator' => '',
    'page cache' => THEMEKEY_PAGECACHE_SUPPORTED,
  );

  // Mapping functions
  $maps = array();
  $maps[] = array(
    'src' => 'node:nid',
    'dst' => 'path:node_alias',
    'callback' => 'themekey_path_nid2alias',
  );
  return array(
    'attributes' => $attributes,
    'maps' => $maps,
  );
}