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

$CalendarWidget with EventCalendar 3


Go to End


1121 Views

Avatar
tiatisch85

Community Member, 5 Posts

16 November 2012 at 6:16am

Hi @ all,

I want to present to the homepage.ss the CalendarWidget.

I have on HomePage.php:
// Funktion zum EventCalendar
public function GlobalCalendarWidget() {
$calendarPage = DataObject::get_one(16); // If you have multiple calendars, specify an id or url segment.
return new CalendarWidget($calendarPage);
}
function CalendarWidget()
{
return DataObject::get_one("Calendar")->CalendarWidget();
}

and on HomePage.ss:
<% control CalendarWidget() %>
$CalendarWidget
<% end_control %>

But it seems nothing!
Have anybody an idea?

Thanks
Thomas