示例#1
0
        public static MvcHtmlString RenderCommonMetas(this HtmlHelper html, WebPageExecutingBase page,
                                                      string keywordsResourceKey = "SeoKeywords", string descriptionResourceKey = "SeoDescription",
                                                      string robotsContent       = "index, follow")
        {
            var htmlText = @"{0}{1}{2}".FormatWith(
                html.RenderKeywords(page.Localize(keywordsResourceKey)),
                html.RenderDescription(page.Localize(descriptionResourceKey)),
                html.RenderRobots(robotsContent));

            return(new MvcHtmlString(htmlText));
        }
示例#2
0
 public static string Localize(this HtmlHelper html, WebPageExecutingBase page, string resourceKey, string defaultValue = null)
 {
     return(page.Localize(resourceKey, defaultValue));
 }