コード例 #1
0
ファイル: LayoutExtensions.cs プロジェクト: sounj142/aaabbb
 /// <summary>
 /// Generate all description parts
 /// </summary>
 /// <param name="html">HTML helper</param>
 /// <param name="part">Meta description part</param>
 /// <param name="pageHeadBuilder"></param>
 /// <returns>Generated string</returns>
 public static MvcHtmlString NopMetaDescription(this HtmlHelper html, IPageHeadBuilder pageHeadBuilder = null,
     string part = null )
 {
     if (pageHeadBuilder == null)
         pageHeadBuilder = EngineContext.Current.Resolve<IPageHeadBuilder>();
     pageHeadBuilder.AppendMetaDescriptionParts(part);
     string content = html.Encode(pageHeadBuilder.GenerateMetaDescription());
     return MvcHtmlString.Create(content);
 }
コード例 #2
0
        /// <summary>
        /// Append meta description element to the <![CDATA[<head>]]>
        /// </summary>
        /// <param name="html">HTML helper</param>
        /// <param name="part">Meta description part</param>
        public static void AppendMetaDescriptionParts(this IHtmlHelper html, string part)
        {
            IPageHeadBuilder pageHeadBuilder = ServiceProviderFactory.ServiceProvider.GetService <IPageHeadBuilder>();

            pageHeadBuilder.AppendMetaDescriptionParts(part);
        }
コード例 #3
0
ファイル: LayoutExtensions.cs プロジェクト: sounj142/aaabbb
 /// <summary>
 /// Append meta description element to the <![CDATA[<head>]]>
 /// </summary>
 /// <param name="html">HTML helper</param>
 /// <param name="part">Meta description part</param>
 /// <param name="pageHeadBuilder"></param>
 public static void AppendMetaDescriptionParts(this HtmlHelper html, string part,
     IPageHeadBuilder pageHeadBuilder = null)
 {
     if (pageHeadBuilder == null)
         pageHeadBuilder = EngineContext.Current.Resolve<IPageHeadBuilder>();
     pageHeadBuilder.AppendMetaDescriptionParts(part);
 }