You are here

function themekey_node_get_q2type in ThemeKey 6.3

Same name and namespace in other branches
  1. 6.4 modules/themekey.node.inc \themekey_node_get_q2type()
  2. 6.2 modules/themekey.node.inc \themekey_node_get_q2type()
  3. 7.3 modules/themekey.node.inc \themekey_node_get_q2type()
  4. 7 modules/themekey.node.inc \themekey_node_get_q2type()
  5. 7.2 modules/themekey.node.inc \themekey_node_get_q2type()

ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).

src: drupal path dst: node type

Parameters

$patch: a drupal path

Return value

string or NULL if no value could be mapped

1 string reference to 'themekey_node_get_q2type'
themekey_node_themekey_properties in modules/themekey.node.inc
Implements hook_themekey_properties().

File

modules/themekey.node.inc, line 442
Provides some node attributes as ThemeKey properties.

Code

function themekey_node_get_q2type($q) {
  if (strpos($q, 'node/add/') === 0) {
    return str_replace('-', '_', str_replace('node/add/', '', $q));
  }
  return NULL;
}