public void SetPageMetaData(string title, string description, string keywords, PageRobots pageRobots) { ViewData["PageTitle"] = title; ViewData["PageDescription"] = description; ViewData["PageKeywords"] = keywords; ViewData["PageRobots"] = GetRobotsDefinition(pageRobots); }
private string GetRobotsDefinition(PageRobots pageRobots) { if (pageRobots == PageRobots.IndexFollow) { return("index, follow"); } else if (pageRobots == PageRobots.NoIndexFollow) { return("noindex, follow"); } else if (pageRobots == PageRobots.IndexNoFollow) { return("index, nofollow"); } else { return("noindex, nofollow"); } }
private string GetRobotsDefinition(PageRobots pageRobots) { if (pageRobots == PageRobots.IndexFollow) { return "index, follow"; } else if (pageRobots == PageRobots.NoIndexFollow) { return "noindex, follow"; } else if (pageRobots == PageRobots.IndexNoFollow) { return "index, nofollow"; } else { return "noindex, nofollow"; } }