You are here

function themename_preprocess_page in Service links 6.2

Same name and namespace in other branches
  1. 6 template.php \themename_preprocess_page()
  2. 7.2 template.php \themename_preprocess_page()

Example 1: Creating the variable '$service_links_rendered' for the template file 'page.tpl.php' containing all the selected services.

File

./template.php, line 24
Various examples to overwrite the theme settings.

Code

function themename_preprocess_page(&$vars) {
  if (module_exists('service_links')) {

    // Works also for not-node pages
    if (user_access('access service links') && service_links_show($vars['node'])) {
      $vars['service_links_rendered'] = theme('links', service_links_render($vars['node']));
    }
  }
}