
Untitled
By: a guest on
Jun 30th, 2012 | syntax:
None | size: 0.53 KB | hits: 14 | expires: Never
Adding a custom themable variable in theme_preprocess_page
function garland_preprocess_page(&$vars) {
// Move secondary tabs into a separate variable.
$vars['tabs2'] = array(
'#theme' => 'menu_local_tasks',
'#secondary' => $vars['tabs']['#secondary'],
);
<snip>
/**
* Override or insert variables into the page template.
*/
function morin_preprocess_page(&$vars) {
// add skiplink markup
$vars['skiplink'] = 'hello world';
}
<theme name>_preprocess_<template name>
<theme name>_preprocess_html(&$variables)