コード例 #1
0
        public ActionResult Index(string language, string category, string id)
        {
            PageModel model = new PageModel(this.HttpContext);

            string viewName = string.Format(
                "~/content/{0}/{1}/{2}/index.cshtml",
                language,
                category,
                id
            );

            return View(viewName, model);
        }
コード例 #2
0
        public ActionResult Image(string language, string category, string id, string image)
        {
            PageModel model = new PageModel(this.HttpContext);

            string path = string.Format(
                "~/content/{0}/{1}/{2}/{3}",
                language,
                category,
                id,
                image
            );

            return this.File(path, MimeMapping.GetMimeMapping(path));
        }
コード例 #3
0
ファイル: BlogController.cs プロジェクト: jalners/ArachneCMS
        public ActionResult Image(string language, string id, string image)
        {
            PageModel model = new PageModel(this.HttpContext);
            Match match = REGEX_POST.Match(id);
            if (match.Success)
            {
                string path = string.Format(
                    "~/content/blog/{0}/{1}/{2}/{3}",
                    match.Result("${year}"),
                    match.Result("${month}"),
                    match.Result("${day}"),
                    image
                );

                return this.File(path, MimeMapping.GetMimeMapping(path));
            }
            else
            {
                return this.HttpNotFound();
            }
        }
コード例 #4
0
ファイル: BlogController.cs プロジェクト: jalners/ArachneCMS
        public ActionResult Post(string language, string id)
        {
            PageModel model = new PageModel(this.HttpContext);
            Match match = REGEX_POST.Match(id);
            if (match.Success)
            {
                string viewName = string.Format(
                    "~/content/blog/{0}/{1}/{2}/{3}.{4}.cshtml",
                    match.Result("${year}"),
                    match.Result("${month}"),
                    match.Result("${day}"),
                    language,
                    match.Result("${id}")
                );

                return View(viewName, model);
            }
            else
            {
                return this.HttpNotFound();
            }
        }
コード例 #5
0
ファイル: HomeController.cs プロジェクト: jalners/ArachneCMS
 public ActionResult Index()
 {
     PageModel model = new PageModel(this.HttpContext);
     return View("Index", model);
 }