Skip to content

Instantly share code, notes, and snippets.

@krueschi
Last active December 14, 2015 01:19
Show Gist options
  • Save krueschi/daaea158bde4dc495a6e to your computer and use it in GitHub Desktop.
Save krueschi/daaea158bde4dc495a6e to your computer and use it in GitHub Desktop.
Bereitstellen neuer Variablen für ein Drupal 6 Theme in template.php
themename_preprocess(&$vars, $hook)
function THEME_preprocess(&$vars, $hook) {
if ($hook == 'page') {
$vars['NEUE_VARIABLE'] = 'WERT';
}
}
themename_preprocess_hook(&$vars)
function THEME_preprocess_page(&$vars) {
$vars['NEUE_VARIABLE'] = 'WERT';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment