Exemple #1
0
        public void Template()
        {
            string action = System.Web.HttpContext.Current.Request["action"];

            if (action == "help")
            {
                string fileName = String.Concat(Cms.PyhicPath,
                                                CmsVariables.TEMP_PATH,
                                                "tpl_lang_guid.xml");
                AutoObjectXml obj = new AutoObjectXml(fileName);
                obj.InsertFromType(typeof(CmsTemplateImpl), false);
                obj.Flush();

                var rsp = System.Web.HttpContext.Current.Response;
                rsp.Write(XmlObjectDoc.DocStyleSheet);

                int tmpInt = 0;
                foreach (XmlObject _obj in obj.GetObjects())
                {
                    rsp.Write(XmlObjectDoc.GetGrid(_obj, ++tmpInt));
                }
            }
            else
            {
                TemplateUtility.PrintTemplatesInfo();
            }
        }
        public void Template()
        {
            string action = HttpHosting.Context.Request.GetParameter("action");

            if (action == "help")
            {
                string fileName = String.Concat(Cms.PhysicPath,
                                                CmsVariables.TEMP_PATH,
                                                "tpl_lang_guid.xml");
                AutoObjectXml obj = new AutoObjectXml(fileName);
                obj.InsertFromType(typeof(CmsTemplateImpl), false);
                obj.Flush();

                var rsp = HttpHosting.Context.Response;
                rsp.WriteAsync(XmlObjectDoc.DocStyleSheet);

                int tmpInt = 0;
                foreach (XmlObject _obj in obj.GetObjects())
                {
                    rsp.WriteAsync(XmlObjectDoc.GetGrid(_obj, ++tmpInt));
                }
            }
            else
            {
                HttpHosting.Context.Response.WriteAsync(TemplateUtility.GetTemplatePagesHTML());
            }
        }