Closed (outdated)
Project:
Calendar
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2010 at 00:55 UTC
Updated:
21 Jul 2020 at 18:35 UTC
Jump to comment: Most recent
Comments
Comment #1
matthewdades commentedComment #2
matthewdades commentedAny hint would be appreciated
Thanks
Comment #3
capellicThere isn't any setting within Views as far as I can tell. Instead, copy the calendar-datebox.tpl.php file into your theme and then you can change the link in there. Here's what it looks like after I was done with it:
Comment #4
lizuka commentedthanks for this piece of code, it's much appreciated !
any ideas on how to format this particular link to set it to the calendar page on the month of the events of that current day ?
something along the lines of :
$output = l($day, 'calendar/' . $date);where $date is the year - month value.
Comment #5
michelepotvin commentedHi, thanks for the info.
I am also trying to link the mini calendar dates to their respective events instead of the day calendar.
Although I cant seem to link to the proper path, (how do I find it???)
as in $output = l($day,
'events/upcoming/'
. $date);
here is a link to the website
http://placide.charlem.com/
Thank you for any help.
Comment #6
bogdanru commentedIf it is 1 event/day, u can set the url of the node same as the $output. It is a simple one, but it works.
Comment #7
blackandcode commentedIf someone wants to make mini calendar block display only one node and link it to a day than this is code you need:
print $class;">print !empty($selected) ? $link : $day;Comment #8
yannickooI also want to link a day to it's event if one is available, here is my code for
calendar-datebox.tpl.phpfile:Comment #9
Rhicreate commentedCode in comment #8 seems to work well in Drupal 7, whereas the earlier code did not work on my install.
Comment #10
mist commentedThank you for good solution :-)
Comment #11
Mabuy commentedThank you for the solution #8. It works well. I'm using Calendar 7.x-3.4. However, I would like to benefit from the colorbox version as provided when one clicks on an item's title in the Day display: this gives a popup window with arrows to look at other items occuring the same say. So it would be possible to handle the case of multiple events per day. Could anyone provide the code for this ?
Comment #12
hoangbien commentedIt work fine. thank you very much,
Comment #13
shortspoken commented#8 Workin' just fine! Thanks!
Comment #14
jonodunnett commented#8 works fine for me too. Also thanks.
re #11, it is easy enough to get the link to launch in colorbox using
$link = l($day, 'node/' . $entity->id, array('attributes' => array('rel' => array('colorbox-gallery'), 'class' => array('colorbox'),'title' => $entity->title)));in place of
$link = l($day, 'node/' . $entity->id, array('attributes' => array('rel' => array('title' => $entity->title)));But this reopens a new fully rendered page in the colorbox. What would be nice is to just render the node and have this open in a colorbox, which I don't know how to achieve.
Comment #15
pandelon commentedCan someone give me a Drupal 8 code for this problem? (or can it be solve other way?)
Comment #16
gauravkhambhala commented@Pandelon,
for Drupal 8: Copy calendar-datebox.html.twig from yourdrupalrootdir/modules/calendar/templates to you theme's templates directory.
Have below code into that file. The code below will generate link as /month-list/201803/27 You can change the href to your needs.
Comment #17
shaktikThanks this works great.
Comment #18
neslee canil pinto