public void SetPageMetaData(string title, string description, string keywords, PageRobots pageRobots)
 {
     ViewData["PageTitle"] = title;
     ViewData["PageDescription"] = description;
     ViewData["PageKeywords"] = keywords;
     ViewData["PageRobots"] = GetRobotsDefinition(pageRobots);
 }
示例#2
0
 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");
     }
 }
示例#3
0
 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"; }
 }