Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to figure out how accomplish this:
a) in Calendar Block (mini calendar) click in a day that has an event (1)
b) then a list with all the events of that day shows up below the calendar, when clicking in the event name (2)
c) the event node is opened (in the same window).
Any help is apreciated, thanks in advance!
Comment | File | Size | Author |
---|---|---|---|
goal.png | 70.92 KB | marco_cruz |
Comments
Comment #1
marco_cruz CreditAttribution: marco_cruz commentedAnswering to myself...
1st
Edit the file theme.inc (sites\all\modules\calendar\theme), line 535.
$vars['class'] = 'mini-day-on ';
to
$vars['class'] = 'mini-day-on '.$date;
this way you get
<div class="month mini-day-on yyyy-mm-dd">
the date values to use later...2nd
Create a block to show titles of the "Calendar" content type, with to exposed fields: Start Date (operator: Is less than or equal to) AND End Date (operator: Is greather tham or equal to) and an Apply button.
3rd
Use jQuery/javascript to do the magic.
Put the code below at the bottom of your page.tpl.php
4th
Hide your exposed filters with CSS
In my test:
#views-exposed-form-calendario-teste-block-6 { display: none}
Last
I know this is not the best, or the most elegant solution, but it works! Any improvements are welcome.
The main problem I'm facing is: I need a better way to set the default values (current date) to the filters to obtain the list of today's events when the page loads an not after the page is loaded
I'm sorry for my bad english, I'm not a native english speaker
Comment #2
Neslee Canil Pinto