Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » events module - querying from multiple calendars

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 813 Views
  • muskie9
    Community Member
    10 Posts

    events module - querying from multiple calendars Link to this post

    Hello all,

    I have been learning to utilize different silverstripe modules for a while now and have used the events module, which works great by the way, but came across an interesting situation that I've been having troubles solving. I have a case where there are multiple calendars through out a schools site (i.e. Student Life, Admissions, Athletics) and would like to query all events. I have used an upcomingEvents function that I found on another post, but have been unable to modify it to query all calendars. It grabs the set number of events from the first calendar it comes across.

    Any tips on this?

    Thanks all!

  • UncleCheese
    4085 Posts

    Re: events module - querying from multiple calendars Link to this post

    Yes, there is a way, actually. If you're on the latest version of event calendar (either update your SVN or download from here http://www.leftandmain.com/silverstripe-modules/2010/08/23/eventcalendar/), you'll see on the Feeds tab for the Calendar, there are now checkboxes to include other calendars in the feed. Select the calendars you want to merge into that one, and then you can use the <% UpcomingEvents %> control.

    Remember, the first argument for UpcomingEvents is the number of events to show, but the second one is the URLSegment of the calendar. So there you would want to use the URLSegment of your all-inclusive calendar..

    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.