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.

All other Modules

Discuss all other Modules here.

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

$CalendarWidget with EventCalendar 3


Reply

336 Views

Avatar
tiatisch85

16 November 2012 at 6:16am Community Member, 5 Posts

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