# HG changeset patch
# User casties
# Date 1475742478 -7200
# Node ID eccbb6239b89ebd5edeeda3ff50deaf7925bbb49
# Parent 9a9a6da1d41581269df5c13312616ff0ec887daa
custom search results for bibliography.
diff -r 9a9a6da1d415 -r eccbb6239b89 mpiwgISMI/search-result.tpl.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpiwgISMI/search-result.tpl.php Thu Oct 06 10:27:58 2016 +0200
@@ -0,0 +1,83 @@
+
+ *
+ *
+ * @endcode
+ *
+ * To check for all available data within $info_split, use the code below.
+ * @code
+ * '. check_plain(print_r($info_split, 1)) .''; ?>
+ * @endcode
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_search_result()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+
>
+
+
+
diff -r 9a9a6da1d415 -r eccbb6239b89 mpiwgISMI/template.php
--- a/mpiwgISMI/template.php Tue Feb 02 17:13:52 2016 +0100
+++ b/mpiwgISMI/template.php Thu Oct 06 10:27:58 2016 +0200
@@ -3,10 +3,29 @@
* Override or insert variables into the page template.
*/
function mpiwgISMI_preprocess_page(&$vars) {
- // Move secondary tabs into a separate variable.
-
-
-
+ // Move secondary tabs into a separate variable.
$vars['MPIWGlogo'] = base_path() . path_to_theme() . '/logoMPIWG.png';
$vars['MCGilllogo'] = base_path() . path_to_theme() . '/bannerMcGill-100.gif';
-}
\ No newline at end of file
+}
+
+/**
+ * Override or insert variables into the search result template.
+ *
+ * @param unknown $variables
+ */
+function mpiwgISMI_preprocess_search_result(&$variables) {
+ // biblio style
+ $base = 'biblio';
+ $style = 'chicago-fullnote-bibliography.csl';
+
+ // get the search result node
+ $result = $variables['result'];
+ $r_node = $result['node'];
+ // load the real node
+ $node = node_load($r_node->entity_id);
+
+ // render the node and pass it to search-result.tpl
+ $render_args = array('#theme' => 'biblio_style', '#node' => $node, '#base' => $base, '#style_name' => $style);
+ $variables['bib_render']= drupal_render($render_args);
+ //$variables['bib_render'] = node_view($node, 'teaser');
+}