示例#1
0
        public virtual ActionResult Breadcrumb(string storeNumber)
        {
            if (string.IsNullOrEmpty(storeNumber))
            {
                return(View());
            }
            var breadcrumbViewModel = BreadcrumbViewService.CreateBreadcrumbViewModel(new GetBreadcrumbParam
            {
                CurrentPageId = SitemapNavigator.CurrentPageId.ToString(),
                CultureInfo   = ComposerContext.CultureInfo
            });
            var model = StoreViewService.GetStoreViewModelAsync(new GetStoreByNumberParam
            {
                Scope       = ComposerContext.Scope,
                CultureInfo = ComposerContext.CultureInfo,
                StoreNumber = storeNumber,
                BaseUrl     = RequestUtils.GetBaseUrl(Request).ToString(),
            }).Result;

            if (model == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            if (!string.IsNullOrEmpty(model.LocalizedDisplayName))
            {
                breadcrumbViewModel.ActivePageName = model.LocalizedDisplayName;
            }

            return(View(breadcrumbViewModel));
        }
示例#2
0
 public BreadcrumbViewModel GetViewModel(Guid currentPageId, Guid currentHomePageId)
 {
     return(BreadcrumbViewService.CreateBreadcrumbViewModel(new GetBreadcrumbParam
     {
         CurrentPageId = currentPageId.ToString(),
         CultureInfo = ComposerContext.CultureInfo
     }));
 }
示例#3
0
        public BreadcrumbViewModel GetViewModel(Guid currentPageId, Guid currentHomePageId)
        {
            var breadcrumbViewModel = BreadcrumbViewService.CreateBreadcrumbViewModel(new GetCheckoutBreadcrumbParam
            {
                CultureInfo = ComposerContext.CultureInfo,
                HomeUrl     = PageService.GetRendererPageUrl(currentHomePageId, ComposerContext.CultureInfo),
            });

            return(breadcrumbViewModel);
        }
示例#4
0
        public virtual ActionResult Breadcrumb()
        {
            var breadcrumbViewModel = BreadcrumbViewService.CreateBreadcrumbViewModel(new GetBreadcrumbParam
            {
                CurrentPageId = SitemapNavigator.CurrentPageId.ToString(),
                CultureInfo   = ComposerContext.CultureInfo
            });

            return(View(breadcrumbViewModel));
        }
        public BreadcrumbViewModel GetViewModel(Guid currentPageId, Guid currentHomePageId)
        {
            var breadcrumbViewModel = BreadcrumbViewService.CreateBreadcrumbViewModel(new GetSearchBreadcrumbParam
            {
                CultureInfo = ComposerContext.CultureInfo,
                HomeUrl     = PageService.GetRendererPageUrl(currentHomePageId, ComposerContext.CultureInfo),
                Keywords    = Request.QueryString["keywords"]
            });

            return(breadcrumbViewModel);
        }
示例#6
0
        public BreadcrumbViewModel GetViewModel(Guid currentPageId, Guid currentHomePageId)
        {
            var breadcrumbViewModel = BreadcrumbViewService.CreateBreadcrumbViewModel(new GetBreadcrumbParam
            {
                CurrentPageId = currentPageId.ToString(),
                CultureInfo   = ComposerContext.CultureInfo
            });

            if (!string.IsNullOrEmpty(StoreContext.ViewModel.LocalizedDisplayName))
            {
                breadcrumbViewModel.ActivePageName = HttpUtility.HtmlEncode(StoreContext.ViewModel.LocalizedDisplayName);
            }

            return(breadcrumbViewModel);
        }