You are here

function themekey_ui_set_path_theme in ThemeKey 7

Same name and namespace in other branches
  1. 6.4 themekey_ui_helper.inc \themekey_ui_set_path_theme()
  2. 6 themekey_ui_helper.inc \themekey_ui_set_path_theme()
  3. 6.2 themekey_ui_helper.inc \themekey_ui_set_path_theme()
  4. 6.3 themekey_ui_helper.inc \themekey_ui_set_path_theme()
  5. 7.3 themekey_ui_helper.inc \themekey_ui_set_path_theme()
  6. 7.2 themekey_ui_helper.inc \themekey_ui_set_path_theme()

Saves a theme assigned to a path alias as ThemeKey rule

Parameters

$path: Drupal path alias as string

$theme: assigned Drupal theme as string

$id: the id of an existing rule if this one should be modified

See also

themekey_rule_set()

1 call to themekey_ui_set_path_theme()
themekey_ui_pathalias_submit in ./themekey_ui_admin.inc
Form submission handler for themekey_ui_pathalias().

File

./themekey_ui_helper.inc, line 76

Code

function themekey_ui_set_path_theme($path, $theme = 'default', $id = 0) {
  $item = array(
    'property' => 'drupal:path',
    'value' => $path,
    'theme' => $theme,
    'enabled' => 1,
  );
  if ($id > 0) {
    $item['id'] = $id;
  }
  themekey_rule_set($item);
}