Exemple #1
0
        public IActionResult EnterYourDetailsHtmlHead()
        {
            var viewModel = new HtmlHeadViewModel()
            {
                CanonicalUrl = new Uri($"{Request.GetBaseAddress()}{RegistrationPath}/{ThisViewCanonicalName}", UriKind.RelativeOrAbsolute),
                Title        = "Enter your details" + PageTitleSuffix,
            };

            Logger.LogInformation($"{nameof(EnterYourDetailsHtmlHead)} has returned content");

            return(this.NegotiateContentResult(viewModel));
        }
Exemple #2
0
        public IActionResult ChatHtmlHead()
        {
            var viewModel = new HtmlHeadViewModel()
            {
                CanonicalUrl = new Uri($"{Request.GetBaseAddress()}{WebchatRegistrationPath}/chat", UriKind.RelativeOrAbsolute),
                Title        = "Webchat" + PageTitleSuffix,
            };

            Logger.LogInformation($"{nameof(ChatHtmlHead)} has returned content");

            return(this.NegotiateContentResult(viewModel));
        }
        public async Task <IActionResult> HtmlHead(string?article)
        {
            var viewModel        = new HtmlHeadViewModel();
            var contentPageModel = await GetContentPageAsync(article).ConfigureAwait(false);

            if (contentPageModel != null)
            {
                mapper.Map(contentPageModel, viewModel);

                viewModel.CanonicalUrl = new Uri($"{Request.GetBaseAddress()}{RegistrationPath}/{contentPageModel.CanonicalName}", UriKind.RelativeOrAbsolute);
            }

            logger.LogInformation($"{nameof(HtmlHead)} has returned content for: {article}");

            return(this.NegotiateContentResult(viewModel));
        }