public ActionResult PublicInfo(string widgetZone, object additionalData = null)
        {
            var nivoSliderSettings = _settingService.LoadSetting<NivoSliderSettings>(_storeContext.CurrentStore.Id);

            var model = new PublicInfoModel();
            model.Picture1Url = GetPictureUrl(nivoSliderSettings.Picture1Id);
            model.Text1 = nivoSliderSettings.Text1;
            model.Link1 = nivoSliderSettings.Link1;

            model.Picture2Url = GetPictureUrl(nivoSliderSettings.Picture2Id);
            model.Text2 = nivoSliderSettings.Text2;
            model.Link2 = nivoSliderSettings.Link2;

            model.Picture3Url = GetPictureUrl(nivoSliderSettings.Picture3Id);
            model.Text3 = nivoSliderSettings.Text3;
            model.Link3 = nivoSliderSettings.Link3;

            model.Picture4Url = GetPictureUrl(nivoSliderSettings.Picture4Id);
            model.Text4 = nivoSliderSettings.Text4;
            model.Link4 = nivoSliderSettings.Link4;

            model.Picture5Url = GetPictureUrl(nivoSliderSettings.Picture5Id);
            model.Text5 = nivoSliderSettings.Text5;
            model.Link5 = nivoSliderSettings.Link5;

            if (string.IsNullOrEmpty(model.Picture1Url) && string.IsNullOrEmpty(model.Picture2Url) &&
                string.IsNullOrEmpty(model.Picture3Url) && string.IsNullOrEmpty(model.Picture4Url) &&
                string.IsNullOrEmpty(model.Picture5Url))
                //no pictures uploaded
                return Content("");


            return View("~/Plugins/Widgets.NivoSlider/Views/WidgetsNivoSlider/PublicInfo.cshtml", model);
        }
Ejemplo n.º 2
0
        public ActionResult PublicInfo(string widgetZone)
        {
            var model = new PublicInfoModel();
            model.Picture1Url = _pictureService.GetPictureUrl(_nivoSliderSettings.Picture1Id, showDefaultPicture: false);
            model.Text1 = _nivoSliderSettings.Text1;
            model.Link1 = _nivoSliderSettings.Link1;

            model.Picture2Url = _pictureService.GetPictureUrl(_nivoSliderSettings.Picture2Id, showDefaultPicture: false);
            model.Text2 = _nivoSliderSettings.Text2;
            model.Link2 = _nivoSliderSettings.Link2;

            model.Picture3Url = _pictureService.GetPictureUrl(_nivoSliderSettings.Picture3Id, showDefaultPicture: false);
            model.Text3 = _nivoSliderSettings.Text3;
            model.Link3 = _nivoSliderSettings.Link3;

            model.Picture4Url = _pictureService.GetPictureUrl(_nivoSliderSettings.Picture4Id, showDefaultPicture: false);
            model.Text4 = _nivoSliderSettings.Text4;
            model.Link4 = _nivoSliderSettings.Link4;

            if (string.IsNullOrEmpty(model.Picture1Url) && string.IsNullOrEmpty(model.Picture2Url) &&
                string.IsNullOrEmpty(model.Picture3Url) && string.IsNullOrEmpty(model.Picture4Url))
                //no pictures uploaded
                return Content("");

            return View("Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo", model);
        }
        public ActionResult PublicInfo(string widgetZone)
        {
            var nivoSliderSettings = _settingService.LoadSetting<NivoSliderSettings>(_storeContext.CurrentStore.Id);

            var model = new PublicInfoModel();
            model.Picture1Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture1Id, showDefaultPicture: false);
            model.Text1 = nivoSliderSettings.Text1;
            model.Link1 = nivoSliderSettings.Link1;

            model.Picture2Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture2Id, showDefaultPicture: false);
            model.Text2 = nivoSliderSettings.Text2;
            model.Link2 = nivoSliderSettings.Link2;

            model.Picture3Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture3Id, showDefaultPicture: false);
            model.Text3 = nivoSliderSettings.Text3;
            model.Link3 = nivoSliderSettings.Link3;

            model.Picture4Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture4Id, showDefaultPicture: false);
            model.Text4 = nivoSliderSettings.Text4;
            model.Link4 = nivoSliderSettings.Link4;

            model.Picture5Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture5Id, showDefaultPicture: false);
            model.Text5 = nivoSliderSettings.Text5;
            model.Link5 = nivoSliderSettings.Link5;

            model.Picture6Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture6Id, showDefaultPicture: false);
            model.Text6 = nivoSliderSettings.Text6;
            model.Link6 = nivoSliderSettings.Link6;

            model.Picture7Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture7Id, showDefaultPicture: false);
            model.Text7 = nivoSliderSettings.Text7;
            model.Link7 = nivoSliderSettings.Link7;

            model.Picture8Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture8Id, showDefaultPicture: false);
            model.Text8 = nivoSliderSettings.Text8;
            model.Link8 = nivoSliderSettings.Link8;

            model.Picture9Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture9Id, showDefaultPicture: false);
            model.Text9 = nivoSliderSettings.Text9;
            model.Link9 = nivoSliderSettings.Link9;

            model.Picture10Url = _pictureService.GetPictureUrl(nivoSliderSettings.Picture10Id, showDefaultPicture: false);
            model.Text10 = nivoSliderSettings.Text10;
            model.Link10 = nivoSliderSettings.Link10;

            if (string.IsNullOrEmpty(model.Picture1Url) && string.IsNullOrEmpty(model.Picture2Url) &&
                string.IsNullOrEmpty(model.Picture3Url) && string.IsNullOrEmpty(model.Picture4Url) &&
                string.IsNullOrEmpty(model.Picture5Url) && string.IsNullOrEmpty(model.Picture6Url) &&
                string.IsNullOrEmpty(model.Picture7Url) && string.IsNullOrEmpty(model.Picture8Url) &&
                string.IsNullOrEmpty(model.Picture9Url) && string.IsNullOrEmpty(model.Picture10Url)
                )
                //no pictures uploaded
                return Content("");

            return View("Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo", model);
        }
        public ActionResult PublicInfo(string widgetZone)
        {
            var nivoSliderSettings = _settingService.LoadSetting<NivoSliderSettings>(_storeContext.CurrentStore.Id);

            var model = new PublicInfoModel();
            model.Picture1Url = GetPictureUrl(nivoSliderSettings.Picture1Id);
            model.Text1 = nivoSliderSettings.Text1;
            model.Link1 = nivoSliderSettings.Link1;

            model.Picture2Url = GetPictureUrl(nivoSliderSettings.Picture2Id);
            model.Text2 = nivoSliderSettings.Text2;
            model.Link2 = nivoSliderSettings.Link2;

            model.Picture3Url = GetPictureUrl(nivoSliderSettings.Picture3Id);
            model.Text3 = nivoSliderSettings.Text3;
            model.Link3 = nivoSliderSettings.Link3;

            model.Picture4Url = GetPictureUrl(nivoSliderSettings.Picture4Id);
            model.Text4 = nivoSliderSettings.Text4;
            model.Link4 = nivoSliderSettings.Link4;

            if (string.IsNullOrEmpty(model.Picture1Url) && string.IsNullOrEmpty(model.Picture2Url) &&
                string.IsNullOrEmpty(model.Picture3Url) && string.IsNullOrEmpty(model.Picture4Url))
                //no pictures uploaded
                return Content("");

            return View("Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo", model);
        }