Ejemplo n.º 1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            ViewBag.StringLocalizer = _localizer;

            if (string.IsNullOrEmpty(_appSettings.ContentPageName))
            {
                return(View());
            }

            var pagesResponse = await _cmsClient?.ListPagesAsync <ContentPage>(_appSettings.ContentPageName);

            return(View(pagesResponse?.Data?.OrderBy(x => x.Fields.NavigationTitle)));
        }
Ejemplo n.º 2
0
        public async Task ListPagesAsync_ShouldReturnPages()
        {
            var response = await butterClient.ListPagesAsync <things>("things");

            Assert.IsNotNull(response);
        }