コード例 #1
0
        public ActionResult Index(IContent currentContent)
        {
            var model = new HeaderViewModel
            {
                CurrentContentLink = GetCategoryOrPageLink(currentContent),
                StartPage = _contentLoader.Get<StartPage>(ContentReference.StartPage)
            };

            return PartialView(model);
        }
コード例 #2
0
        public ActionResult RightMenu(IContent currentContent)
        {
            string userDisplayName = null;
            CustomerContact customer = _currentContactFacade.CurrentContact;

            if (customer != null)
            {
                userDisplayName = customer.FirstName + " " + customer.LastName;
            }

            var model = new HeaderViewModel
            {
                CurrentContentLink = currentContent != null ? currentContent.ContentLink : null,
                StartPage = _contentLoader.Get<StartPage>(ContentReference.StartPage),
                UserDisplayName = userDisplayName
            };

            return PartialView(model);
        }