Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Calendar and "CalendarShoutBox"


Go to End


4 Posts   1069 Views

Avatar
Victor

Community Member, 128 Posts

25 November 2009 at 2:28am

We have a Calendar and CalendarEvent pages (from event_calendar) but we want also a CalendarShoutBox on some other kind of page which displays exactly the same events as Calendar but without CalendarSideBar and DatePicker (and ideally displays only events in the next 10 days).

Thank you in advance

Victor

Avatar
UncleCheese

Forum Moderator, 4102 Posts

25 November 2009 at 3:38am

The UpcomingEvents function is decorated into your SiteTree, so you should just be able to add <% control UpcomingEvents %>$_Dates, etc..<% end_control %> to any template.

Avatar
Victor

Community Member, 128 Posts

25 November 2009 at 5:24am

Edited: 25/11/2009 7:00am

And if I have not a Calendar but WorkshopHolder as
http://doc.silverstripe.org/doku.php?id=recipes:extending_the_event_calendar

I will try to figure out what should I use to replace UpcomingEvents

Avatar
Victor

Community Member, 128 Posts

26 November 2009 at 12:53pm

Cannot figure out how to do it. Say we extend EventCalendar (following instructions)
http://doc.silverstripe.org/doku.php?id=recipes:extending_the_event_calendar
and want put something on a separate page.

<% control UpcomingEvents %>$_Dates, etc..<% end_control %> 

which works for plain EventCalendar does not work anymore. I made few attempts to create
WorkshopSiteTree.php, from trivial
<?php

class WorkshopSiteTree extends CalendarSiteTree
{
}

to more complicated but no more working.

Any suggestions?

Another question:

CalendarSiteTree.php contains no closing

?>
but works. Why?

Victor