/// <summary> /// 默认模板替换函数 /// </summary> /// <param name="urlInfo"></param> /// <param name="site"></param> /// <param name="skin"></param> /// <param name="page"></param> /// <param name="pageCode"></param> /// <param name="tag"></param> public override void ParseTag(Page.MaUrl urlInfo, IMaSite site, IMaSkin skin, Page.MaPage page, ref StringBuilder pageCode, MaTag tag) { //模板名称 string _tName = tag["tmp"]; string _templateStr; if (!skin.TryGetTemplate(_tName, out _templateStr)) { _templateStr = "<!--获取模板文件[" + _tName + "]出错-->"; throw new Exception("获取模板文件[" + _tName + "]出错,【" + urlInfo.ToString() + "】"); } pageCode = pageCode.Replace(tag.TagStr, _templateStr); }
/// <summary> /// 重写初始化页面 /// </summary> /// <param name="context"></param> /// <param name="url"></param> /// <param name="web"></param> /// <param name="site"></param> /// <param name="skin"></param> /// <param name="page"></param> public override void InitPage(System.Web.HttpContext context, Page.MaUrl url, IMaWeb web, IMaSite site, IMaSkin skin, Page.MaPage page) { base.InitPage(context, url, web, site, skin, page); }