Drupal Calendar views display
I am working on a project which has events calendar. I am using date and calendar module for that.
On calendar month page, we can display titles of events on that day. That is simple. But suppose there are 10 events on one day, then that day column becomes too long. So, instead of displaying titles, I want to display no. of events on that day and place a link on it which will go to the day view.
Using custom php code module for views, i created one field where I am entering this code
<?php
$view = views_get_current_view();
$view->set_display(day_view);
print count($view->result).' events';
?>
"day_view" is the id of the view which display events on that particular day.
If I am not using $view->set_display(d开发者_如何学Goay_view); it willk display no. of events for that month. But I want to disply no. of events for that day only.
My logic is since day view displays events from that day only, it will return correct number, if I call its display for month view. But it's not doing so.
Also how to generate link for day view?
Please help!
精彩评论