public Skin(string name, string virtualPath, string displayName) { Require.NotNullOrEmpty(name, "name"); Require.NotNullOrEmpty(virtualPath, "virtualPath"); Name = name; VirtualPath = UrlUtil.ToAbsoluteHtmlPath(virtualPath); DisplayName = new LocalizableText(String.IsNullOrEmpty(displayName) ? "{ " + name + " }" : displayName); }
public Template(string name) { Require.NotNullOrEmpty(name, "name"); Name = name; DisplayName = new LocalizableText(String.Format("{{ Template={0}, Key={1} }}", name, name)); Skins = new TemplateSkinCollection(this); Layouts = new LayoutCollection(this); ResourcesFolder = new ResourceFolder(HostingEnvironment.MapPath(ResourceFolderVirtualPath)); }
public void SetDisplayName(LocalizableText displayName) { DisplayName = displayName; DisplayName.ResourceDescriptor.TemplateName = Name; }
private void Configure() { string path = Server.MapPath(UrlUtil.Combine(VirtualPath, "config.config")); if (File.Exists(path)) { var xml = XDocument.Load(path).Root; var displayName = xml.ChildElementValue("display-name"); if (!String.IsNullOrEmpty(displayName)) { DisplayName = new LocalizableText(displayName); DisplayName.ResourceDescriptor.TemplateName = Template.Name; } } if (DisplayName == null) { DisplayName = new LocalizableText(String.Format("{{ Template={0}, Key={1} }}", Template.Name, Name)); } var layoutParser = LayoutFileParsers.GetParser(".aspx"); var parseResult = layoutParser.Parse(Server.MapPath(AspxVirtualPath)); foreach (var zoneName in parseResult.ZoneNames) { _zones.Add(zoneName, new Zone(zoneName, this)); } }