public HeaderAndFooterTemplateDeclaration(TemplateDeclarationConfig cfg, XmlElement el) : base(el) { this.header = el.GetAttribute("header"); this.footer = el.GetAttribute("footer"); Regex rxIsRoot = new Regex("^[/~]"); if (!rxIsRoot.IsMatch(this.header)) this.header = cfg.BaseDirectory + "/" + this.header; if (!rxIsRoot.IsMatch(this.footer)) this.footer = cfg.BaseDirectory + "/" + this.footer; }
public HeaderAndFooterTemplateDeclaration(TemplateDeclarationConfig cfg, XmlElement el) : base(el) { this.header = el.GetAttribute("header"); this.footer = el.GetAttribute("footer"); Regex rxIsRoot = new Regex("^[/~]"); if (!rxIsRoot.IsMatch(this.header)) { this.header = cfg.BaseDirectory + "/" + this.header; } if (!rxIsRoot.IsMatch(this.footer)) { this.footer = cfg.BaseDirectory + "/" + this.footer; } }
static TemplatedPage() { templates = (TemplateDeclarationConfig) ConfigurationSettings.GetConfig("suprifattus.templates/templates"); mappings = (TemplateMappingConfig) ConfigurationSettings.GetConfig("suprifattus.templates/mappings"); }