Ejemplo n.º 1
0
        private void CreateEventsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(EventsPageId), "Events");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(EventsPageId), new Guid(SamplesTemplateId));

                var templateKey = SampleUtilities.GetControlTemplateKey(typeof(MasterView), "Titles, cities, dates");
                SampleUtilities.RegisterEventsFrontendView("EventsFrontend", templateKey, typeof(MasterView), "EventsFrontendDateList");

                var eventsControl = new EventsView();
                eventsControl.MasterViewName = "EventsFrontendDateList";
                eventsControl.ControlDefinition.GetDefaultDetailView().TemplateKey = SampleUtilities.GetControlTemplateKey(typeof(Telerik.Sitefinity.Modules.Events.Web.UI.Public.DetailsView), "Full event item");

                SampleUtilities.AddControlToPage(new Guid(EventsPageId), eventsControl, "Content", "Events View");
            }
        }