8
|
1 <?php
|
|
2 /**
|
|
3 * Override or insert variables into the page template.
|
|
4 */
|
|
5 function mpiwgISMI_preprocess_page(&$vars) {
|
37
|
6 // Move secondary tabs into a separate variable.
|
8
|
7 $vars['MPIWGlogo'] = base_path() . path_to_theme() . '/logoMPIWG.png';
|
|
8 $vars['MCGilllogo'] = base_path() . path_to_theme() . '/bannerMcGill-100.gif';
|
37
|
9 }
|
|
10
|
|
11 /**
|
|
12 * Override or insert variables into the search result template.
|
|
13 *
|
|
14 * @param unknown $variables
|
|
15 */
|
|
16 function mpiwgISMI_preprocess_search_result(&$variables) {
|
|
17 // biblio style
|
|
18 $base = 'biblio';
|
|
19 $style = 'chicago-fullnote-bibliography.csl';
|
|
20
|
|
21 // get the search result node
|
|
22 $result = $variables['result'];
|
|
23 $r_node = $result['node'];
|
|
24 // load the real node
|
|
25 $node = node_load($r_node->entity_id);
|
|
26
|
|
27 // render the node and pass it to search-result.tpl
|
|
28 $render_args = array('#theme' => 'biblio_style', '#node' => $node, '#base' => $base, '#style_name' => $style);
|
|
29 $variables['bib_render']= drupal_render($render_args);
|
|
30 //$variables['bib_render'] = node_view($node, 'teaser');
|
|
31 }
|