private void BindSkin() { string title = string.Format(CultureInfo.InvariantCulture, Resource.ManageSkinFormat, skinName); Title = SiteUtils.FormatPageTitle(siteSettings, title); heading.Text = title; lnkThisPage.Text = skinName; string skinFolderPath = Server.MapPath(skinBasePath + skinName); var files = SkinHelper.GetCssFileList(skinFolderPath: skinFolderPath, recursive: true); //List<object> fileObjs = new List<object>(); StringBuilder sb = new StringBuilder(); foreach (var file in files) { //we want to have just the name and the directory starting at the skin path //fileObjs.Add(new { Name = file.Name, Directory = file.DirectoryName.Replace(skinFolderPath, "") }); string thisPath = file.FullName.Replace(skinFolderPath, "").TrimStart('/').TrimStart('\\').Replace('\\', '/'); sb.Append($"<li class='simplelist'><a href='{SiteRoot}/DesignTools/CssEditor.aspx?s={skinName}&f={thisPath}'>{thisPath}</a></li>"); } litCssFiles.Text = $"<ul class='simplelist'>{sb.ToString()}</ul>"; //rptCss.DataSource = fileObjs; // rptCss.DataBind(); }
private void BindSkin() { string title = string.Format(CultureInfo.InvariantCulture, Resource.ManageSkinFormat, skinName); Title = SiteUtils.FormatPageTitle(siteSettings, title); heading.Text = title; lnkThisPage.Text = skinName; rptCss.DataSource = SkinHelper.GetCssFileList(Server.MapPath(skinBasePath + skinName)); rptCss.DataBind(); }