예제 #1
0
        /// <summary>
        /// 保存到文件
        /// </summary>
        /// <param name="path"></param>
        /// <param name="templateId"></param>
        /// <param name="data"></param>
        public static void Save(string path, string templateId, object data, out string html)
        {
            TemplatePage page = new TemplatePage(templateId, data);

            page.OnPreRender += PreHandler;
            page.OnPreRender += CompliedTemplate;

            //注册扩展的模板解析事件
            if (OnPreRender != null)
            {
                page.OnPreRender += OnPreRender;
            }

            page.SaveToFile(path, out html);
        }
예제 #2
0
        /// <summary>
        /// 保存到文件
        /// </summary>
        /// <param name="path"></param>
        /// <param name="templateID"></param>
        /// <param name="data"></param>
        public static void Save(string path, string templateID, object data)
        {
            TemplatePage page = new TemplatePage(templateID, data);

            page.OnPreRender += PreHandler;
            page.OnPreRender += Spc.Template.MultLangCmsTemplates.CompliedTemplate;

            //注册扩展的模板解析事件
            if (OnPreRender != null)
            {
                page.OnPreRender += OnPreRender;
            }

            page.SaveToFile(path);
        }
예제 #3
0
        /// <summary>
        /// 保存到文件
        /// </summary>
        /// <param name="path"></param>
        /// <param name="templateId"></param>
        /// <param name="data"></param>
        public static void Save(string path, string templateId, object data,out string html)
        {
            TemplatePage page = new TemplatePage(templateId, data);
            page.OnPreRender += PreHandler;
            page.OnPreRender += CompliedTemplate;

            //注册扩展的模板解析事件
            if (OnPreRender != null) page.OnPreRender += OnPreRender;

            page.SaveToFile(path,out html);
        }
예제 #4
0
        /// <summary>
        /// 保存到文件
        /// </summary>
        /// <param name="path"></param>
        /// <param name="templateID"></param>
        /// <param name="data"></param>
        public static void Save(string path, string templateID, object data)
        {
            TemplatePage page = new TemplatePage(templateID, data);
            page.OnPreRender += PreHandler;
            page.OnPreRender += Spc.Template.MultLangCmsTemplates.CompliedTemplate;

            //注册扩展的模板解析事件
            if (OnPreRender != null) page.OnPreRender += OnPreRender;

            page.SaveToFile(path);
        }