public ActionResult Index(string labelForURL) { labelForURL = labelForURL ?? "index"; if (labelForURL != "index") { if (repository.GetPageByName(labelForURL) == null) { if (articleRepository.GetArticleByURL(labelForURL) == null) { return(View((PageModel)repository.GetPageByName("404"))); } else { return(View((PageModel)articleRepository.GetArticleByURL(labelForURL))); } } } return(View((PageModel)(repository.GetPageByName(labelForURL)))); }