public ActionResult Article(string slug, ArticleRevisionDate revisionDate = null, bool redirect = true) { var model = new WikiArticleViewModel(this.Request.RequestContext, slug, revisionDate, redirect); this.Seo.CanonicalUrl = this.GetArticleCanonicalUrl(model); return(this.View(model)); }
private string GetArticleCanonicalUrl(WikiArticleViewModel model) { string canonicalUrl = null; if (model.ShouldRedirect) { canonicalUrl = this.Url.WikiArticle(model.ArticleRedirectTo); } else if (model.HasArticle) { canonicalUrl = this.Url.WikiArticle(model.ArticleId); } return(canonicalUrl); }
public ActionResult Index() { var model = new WikiArticleViewModel(this.Request.RequestContext, string.Empty); return(this.View("Article", model)); }