Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
        public ActionResult PageZones(QueryContext context)
        {
            var zoneService   = ServiceLocator.Current.GetInstance <IZoneService>();
            var widgetService = ServiceLocator.Current.GetInstance <IWidgetService>();
            var page          = Service.Get(context.PageID);
            var layoutService = ServiceLocator.Current.GetInstance <ILayoutService>();
            var layout        = layoutService.Get(page.LayoutId);
            var viewModel     = new ViewModels.LayoutZonesViewModel
            {
                PageID     = context.PageID,
                LayoutID   = layout.ID,
                Zones      = zoneService.GetZonesByPageId(context.PageID),
                Widgets    = widgetService.GetAllByPageId(context.PageID),
                LayoutHtml = layout.Html
            };

            return(View(viewModel));
        }