summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--calendario.module10
1 files changed, 10 insertions, 0 deletions
diff --git a/calendario.module b/calendario.module
index 9fc934a..0a4bfa8 100644
--- a/calendario.module
+++ b/calendario.module
@@ -44,3 +44,13 @@ function calendario_entity_info_alter(&$entity_info) {
function calendario_widget($view = NULL) {
return theme('embed-widget');
}
+
+/**
+ * Implements hook_views_pre_render()
+ */
+function calendario_views_pre_render(&$view) {
+ // Filter out unavailable items from view.
+ if (substr($view->name, 0, 10) == 'calendario' && substr($view->name, 0, 17) != 'calendario_widget') {
+ $view->footer = calendario_widget($view);
+ }
+}