Example #1
0
        public IActionResult LayoutZones(string ID)
        {
            var layout    = Service.Get(ID);
            var viewModel = new LayoutZonesViewModel
            {
                Layout     = layout,
                LayoutID   = ID,
                Zones      = _zoneService.GetZonesByLayoutId(ID),
                Widgets    = _widgetService.GetByLayoutId(ID),
                LayoutHtml = layout.Html
            };

            return(View(viewModel));
        }
        public ActionResult LayoutZones(string ID)
        {
            var widgetService = ServiceLocator.Current.GetInstance <IWidgetService>();
            var layout        = Service.Get(ID);
            var viewModel     = new LayoutZonesViewModel
            {
                LayoutID   = ID,
                Zones      = _zoneService.GetZonesByLayoutId(ID),
                Widgets    = widgetService.GetByLayoutId(ID),
                LayoutHtml = layout.Html
            };

            return(View(viewModel));
        }