]> gitweb.fluxo.info Git - drupal/calendario.git/commitdiff
Using calendario_views_post_render()
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Aug 2012 21:50:54 +0000 (18:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Aug 2012 21:50:54 +0000 (18:50 -0300)
calendario.module

index 0a4bfa85e11e5afc4563a4cf6702e8197547f678..0ff2a4e33d098dfb7067e49ba32bdb86c6450724 100644 (file)
@@ -46,11 +46,10 @@ function calendario_widget($view = NULL) {
 }
 
 /**
- * Implements hook_views_pre_render()
+ * Implements hook_views_post_render()
  */
-function calendario_views_pre_render(&$view) {
-  // Filter out unavailable items from view.
+function calendario_views_post_render(&$view, &$output, &$cache) {
   if (substr($view->name, 0, 10) == 'calendario' && substr($view->name, 0, 17) != 'calendario_widget') {
-    $view->footer = calendario_widget($view);
+    $output .= calendario_widget($view);
   }
 }