コード例 #1
0
        public IActionResult Custom()
        {
            //removing leading slash
            string id = Request.Path.Value.Remove(0, 1);

            if (!string.IsNullOrEmpty(id))
            {
                var container = SpoonDataWorker.GetContainer(id);

                if (container != null && container.Items.Count > 0)
                {
                    ViewData["CustomData"] = container.GetItem().Value;
                    return(View("Custom"));
                }
            }

            return(View("NotFound"));
        }
コード例 #2
0
 public IActionResult Index()
 {
     ViewData["Title"]    = SpoonDataWorker.GetContainer("HomePage").GetItem("pageTitle").Value;
     ViewData["Carousel"] = SpoonDataWorker.GetContainer("HomePage").GetItem("myCarousel").Value;
     return(View());
 }