コード例 #1
0
ファイル: LayoutExtensions.cs プロジェクト: sounj142/aaabbb
 /// <summary>
 /// Add 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 AddMetaDescriptionParts(this HtmlHelper html, string part, 
     IPageHeadBuilder pageHeadBuilder = null)
 {
     if (pageHeadBuilder == null)
         pageHeadBuilder = EngineContext.Current.Resolve<IPageHeadBuilder>();
     pageHeadBuilder.AddMetaDescriptionParts(part);
 }
コード例 #2
0
        /// <summary>
        /// Add meta description element to the <![CDATA[<head>]]>
        /// </summary>
        /// <param name="html">HTML helper</param>
        /// <param name="part">Meta description part</param>
        public static void AddMetaDescriptionParts(this IHtmlHelper html, string part)
        {
            IPageHeadBuilder pageHeadBuilder = ServiceProviderFactory.ServiceProvider.GetService <IPageHeadBuilder>();

            pageHeadBuilder.AddMetaDescriptionParts(part);
        }