Skip to content

Instantly share code, notes, and snippets.

@zanesensenig
Created January 5, 2016 17:36
Show Gist options
  • Save zanesensenig/5beaf37490b2a4eee0f0 to your computer and use it in GitHub Desktop.
Save zanesensenig/5beaf37490b2a4eee0f0 to your computer and use it in GitHub Desktop.
New Site Template Reset
<?php
function hook_preprocess_html(&$variables) {
}
function hook_preprocess_page(&$variables) {
if ($node = menu_get_object()) {
$variables['node'] = $node;
}
$search_box = drupal_render(drupal_get_form('search_block_form'));
$variables['search_box'] = $search_box;
}
function hook_preprocess_node(&$variables) {
}
function hook_menu_local_tasks(&$variables) {
$output = '';
if (!empty($variables['primary'])) {
$variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
$variables['primary']['#prefix'] .= '<ul class="button-group tabs primary">';
$variables['primary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['primary']);
}
if (!empty($variables['secondary'])) {
$variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
$variables['secondary']['#prefix'] .= '<ul class="button-group tabs primary">';
$variables['secondary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['secondary']);
}
return $output;
}
function hook_page_alter(&$page) {
// kpr($page);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment