annotate mpiwgISMI/template.php @ 60:1b520696760a default tip

new ismixml_splitter.py that splits openmind-data.xml into separate files per entity type.
author casties
date Tue, 19 Jun 2018 21:46:49 +0200
parents eccbb6239b89
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
1 <?php
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
2 /**
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
3 * Override or insert variables into the page template.
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
4 */
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
5 function mpiwgISMI_preprocess_page(&$vars) {
37
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
6 // Move secondary tabs into a separate variable.
8
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
7 $vars['MPIWGlogo'] = base_path() . path_to_theme() . '/logoMPIWG.png';
5148098e96a4 add theme drupalISMI.
casties
parents:
diff changeset
8 $vars['MCGilllogo'] = base_path() . path_to_theme() . '/bannerMcGill-100.gif';
37
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
9 }
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
10
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
11 /**
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
12 * Override or insert variables into the search result template.
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
13 *
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
14 * @param unknown $variables
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
15 */
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
16 function mpiwgISMI_preprocess_search_result(&$variables) {
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
17 // biblio style
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
18 $base = 'biblio';
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
19 $style = 'chicago-fullnote-bibliography.csl';
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
20
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
21 // get the search result node
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
22 $result = $variables['result'];
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
23 $r_node = $result['node'];
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
24 // load the real node
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
25 $node = node_load($r_node->entity_id);
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
26
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
27 // render the node and pass it to search-result.tpl
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
28 $render_args = array('#theme' => 'biblio_style', '#node' => $node, '#base' => $base, '#style_name' => $style);
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
29 $variables['bib_render']= drupal_render($render_args);
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
30 //$variables['bib_render'] = node_view($node, 'teaser');
eccbb6239b89 custom search results for bibliography.
casties
parents: 8
diff changeset
31 }