Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 30th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Adding a custom themable variable in theme_preprocess_page
  2. function garland_preprocess_page(&$vars) {
  3.   // Move secondary tabs into a separate variable.
  4.   $vars['tabs2'] = array(
  5.    '#theme' => 'menu_local_tasks',
  6.    '#secondary' => $vars['tabs']['#secondary'],
  7.   );
  8.  
  9.  <snip>
  10.        
  11. /**
  12.  * Override or insert variables into the page template.
  13.  */
  14. function morin_preprocess_page(&$vars) {
  15.   // add skiplink markup
  16.   $vars['skiplink'] = 'hello world';
  17.  }
  18.        
  19. <theme name>_preprocess_<template name>
  20.        
  21. <theme name>_preprocess_html(&$variables)