Beispiel #1
0
        //[OutputCache(Duration = int.MaxValue, VaryByParam = "*")]
        public ActionResult Details(int?id, string module)
        {
            //module
            ItemsModulesOptions currentModule = ItemsModulesOptions.GetType(module);

            if (id.HasValue)
            {
                ViewBag.Message = "Your application description page.";
                FrontItemsModel currentItem = FrontItemsController.GetItemObject(id.Value, SiteSettings.GetCurrentLanguage());
                ViewData["CurrentItem"]        = currentItem;
                ViewData["CurrentItemsModule"] = currentModule;
                ViewBag.CurrentModule          = currentModule;

                NavigationManager.Instance.BuilDetailsPathesLinks(currentModule, currentItem);
                ViewBag.Title = NavigationManager.Instance.PageTitle;
                if (id.HasValue)
                {
                    ViewBag.ActiveID = id.Value;
                }
                return(View("~/Views/" + module + "/details.cshtml", currentItem));
            }
            else
            {
                return(HttpNotFound());
            }
        }
Beispiel #2
0
        //[OutputCache(Duration = CacheDuration, VaryByParam = "*")]
        public ActionResult Message(int?id, string module)
        {
            //module
            MessagesModuleOptions currentModule = MessagesModuleOptions.GetType(module);

            if (id.HasValue)
            {
                ViewBag.Message = "Your application description page.";
                FrontItemsModel currentItem = FrontItemsController.GetItemObject(id.Value, SiteSettings.GetCurrentLanguage());
                ViewData["CurrentItem"]           = currentItem;
                ViewData["CurrentMessagesModule"] = currentModule;
                // NavigationManager.Instance.BuilDetailsPathesLinks(currentModule, currentItem);
                return(View("~/Views/" + module + "/details.cshtml", currentItem));
            }
            else
            {
                ViewBag.Message = "Your application description page.";
                NavigationManager.Instance.BuilDefaultPathesLinks(currentModule);
                ViewBag.Title = NavigationManager.Instance.PageTitle;
                return(View("~/Views/" + module + "/index.cshtml"));
            }
        }