public function calendarview()
    {
        $s = CalendarConfig::subpackage_settings('pagetypes');

        //Debug::dump($s);

        if (isset($s['calendarpage']['calendarview']) && $s['calendarpage']['calendarview']) {

            Requirements::javascript('calendar/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/moment.min.js');
            Requirements::javascript('calendar/thirdparty/fullcalendar/2.9.1/fullcalendar/fullcalendar.min.js');
            Requirements::css('calendar/thirdparty/fullcalendar/2.9.1/fullcalendar/fullcalendar.min.css');
            Requirements::css('calendar/thirdparty/fullcalendar/2.9.1/fullcalendar/fullcalendar.print.css', 'print');

            //xdate - needed for some custom code - e.g. shading
            Requirements::javascript('calendar/thirdparty/xdate/xdate.js');

            Requirements::javascript('calendar/javascript/fullcalendar/PublicFullcalendarView.js');

            $url = CalendarHelper::add_preview_params($this->Link(),$this->data());
            $fullcalendarjs = $s['calendarpage']['fullcalendar_js_settings'];
			$controllerUrl = CalendarHelper::add_preview_params($s['calendarpage']['controllerUrl'],$this->data());

            //shaded events
            $shadedEvents = 'false';
            $sC = CalendarConfig::subpackage_settings('calendars');
            if ($sC['shading']) {
                $shadedEvents = 'true';
            }
			
            //Calendar initialization (and possibility for later configuration options)
            Requirements::customScript("
				(function($) {
					$(function () {
						//Initializing fullcalendar
						var cal = new PublicFullcalendarView($('#calendar'), '$url', {
							controllerUrl: '$controllerUrl',
							fullcalendar: {
								$fullcalendarjs
							},
							shadedevents: $shadedEvents
						});
					});
				})(jQuery);
			");


            return $this;
        } else {
            return $this->httpError(404);
        }
    }