10387 Posts in 2198 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 592 Views |
-
Event Calendar: Can I filter UpcomingEvents on the front page?

10 June 2010 at 5:20am
Hi,
If I had an extra field extended for CalendarEvents, like a category field. Could I filter that with UpcomingEvents()? If so, how should I go about it?
John -
Re: Event Calendar: Can I filter UpcomingEvents on the front page?

10 June 2010 at 5:39am
I believe the second argument for Calendar::UpcomingEvents() is a filter clause.
-
Re: Event Calendar: Can I filter UpcomingEvents on the front page?

10 June 2010 at 5:57am
I thought it was the url?
-
Re: Event Calendar: Can I filter UpcomingEvents on the front page?

10 June 2010 at 6:39am
That's for the function that's decorated on the SiteTree. That's just a convenient wrapper for Calendar::UpcomingEvents().
You'll have to write a custom function in your controller.. something like:
if($calendar = DataObject::get_one("Calendar", ... filter clause if necessary))
return $calendar->UpcomingEvents(5, "Category = Foo");
return false; -
Re: Event Calendar: Can I filter UpcomingEvents on the front page?

10 June 2010 at 8:10am
Excellent.
Got another question to pick your brain with.On the list of upcoming events I have this:
Royal Rangers meeting (reoccurring)
Royal Rangers meeting (reoccurring)
Royal Rangers meeting (reoccurring)
Royal Rangers Assembly (onetime)
Some other one time event (onetime)What would I do to to filter like this.
Royal Rangers meeting (most recent reoccurring of this series)
Royal Rangers Assembly (onetime)
Some other one time event (onetime)Any idea?
| 592 Views | ||
|
Page:
1
|
Go to Top |

