コード例 #1
0
 private static IHtmlString RenderThemeCustomPartial(HtmlHelper helper, string viewPathToFormat)
 {
     string themeName = new LayersCmsConfigHelper().GetTheme();
     string viewPath = string.Format(viewPathToFormat, themeName);
     string filePath = HttpContext.Current.Server.MapPath(String.Format("~/views/shared/{0}.cshtml", viewPath));
     if (File.Exists(filePath))
     {
         return helper.Partial(viewPath);
     }
     return null;
 }
コード例 #2
0
ファイル: BundleConfig.cs プロジェクト: kbit52/LayersCMS
 private static string GetThemeCssFilepath()
 {
     string themeName = new LayersCmsConfigHelper().GetTheme();
     return string.Format("~/content/themes/{0}.css", themeName);
 }