public string Render() { Header_Template headerTemplate = new Header_Template(); Footer_Template footerTemplate = new Footer_Template(); RightMenu_Template rightMenuTemplate = new RightMenu_Template(this.user); LeftMenu_Template leftMenu_Template = new LeftMenu_Template(false); string content = File.ReadAllText(WebSite.WEBSITE_ROOT_PATH + "public/html/main_layout.html"); content = content.Replace("__HEADER__", headerTemplate.Render()); content = content.Replace("__FOOTER__", footerTemplate.Render()); content = content.Replace("__RIGHT_MENU__", rightMenuTemplate.Render()); content = content.Replace("__LEFT_MENU__", leftMenu_Template.Render()); content = content.Replace("__CONTENT__", File.ReadAllText(WebSite.WEBSITE_ROOT_PATH + "public/html/register.html")); string error_data = string.Empty; foreach (Error error in Errors) { Error_Template error_template = new Error_Template(error); error_data += error_template.Render(); } content = content.Replace("__Error__", error_data); return(content); }
public string Render() { Header_Template headerTemplate = new Header_Template(); Footer_Template footerTemplate = new Footer_Template(); RightMenu_Template rightMenuTemplate = new RightMenu_Template(this.user); LeftMenu_Template leftMenu_Template = new LeftMenu_Template(false); string content = File.ReadAllText(WebSite.WEBSITE_ROOT_PATH + "public/html/main_layout.html"); content = content.Replace("__HEADER__", headerTemplate.Render()); content = content.Replace("__FOOTER__", footerTemplate.Render()); content = content.Replace("__RIGHT_MENU__", rightMenuTemplate.Render()); content = content.Replace("__LEFT_MENU__", leftMenu_Template.Render()); content = content.Replace("__CONTENT__", File.ReadAllText(WebSite.WEBSITE_ROOT_PATH + "public/html/home.html")); return(content); }