コード例 #1
0
        public ActionResult PageZones(QueryContext context)
        {
            var zoneService   = new ZoneService();
            var widgetService = new WidgetService();
            var page          = Service.Get(context.PageID);
            var layoutService = new LayoutService();
            var layout        = layoutService.Get(page.LayoutId);
            var viewModel     = new ViewModels.LayoutZonesViewModel
            {
                PageID     = context.PageID,
                Zones      = zoneService.GetZonesByPageId(context.PageID),
                Widgets    = widgetService.GetAllByPageId(context.PageID),
                LayoutHtml = layout.Html
            };

            return(View(viewModel));
        }