Beispiel #1
0
 /// <summary>
 /// 解析一般模板标签
 /// </summary>
 /// <param name="PageStr"></param>
 /// <returns></returns>
 protected string ExecuteTags(string PageStr)
 {
     JumboTCMS.DAL.TemplateEngineDAL teDAL = new JumboTCMS.DAL.TemplateEngineDAL("0");
     teDAL.IsHtml = site.IsHtml;
     teDAL.ReplacePublicTag(ref PageStr);
     teDAL.ReplaceChannelClassLoopTag(ref PageStr);
     teDAL.ReplaceContentLoopTag(ref PageStr);
     return PageStr;
 }
Beispiel #2
0
 /// <summary>
 /// 解析主站的基本信息
 /// </summary>
 /// <param name="PageStr"></param>
 protected void ReplaceSiteTags(ref string PageStr)
 {
     JumboTCMS.DAL.TemplateEngineDAL teDAL = new JumboTCMS.DAL.TemplateEngineDAL("0");
     teDAL.IsHtml = site.IsHtml;
     teDAL.ReplaceSiteTags(ref PageStr);
 }
Beispiel #3
0
 /// <summary>
 /// 生成栏目文件
 /// </summary>
 /// <param name="_classId"></param>
 /// <param name="CreateParent"></param>
 protected void CreateClassFile(JumboTCMS.Entity.Normal_Channel _channel, string _classId, bool CreateParent)
 {
     JumboTCMS.DAL.TemplateEngineDAL teDAL = new JumboTCMS.DAL.TemplateEngineDAL(_channel.Id);
     int pageCount = new JumboTCMS.DAL.Normal_ClassDAL().GetContetPageCount(_channel.Id, _classId, true);
     int maxPage = JumboTCMS.Utils.Int.Min(site.CreatePages, pageCount);
     string PageStr = string.Empty;
     for (int i = 1; i < (maxPage + 1); i++)
     {
         PageStr = teDAL.GetSiteClassPage(_classId, i);
         JumboTCMS.Utils.DirFile.SaveFile(PageStr, Go2Class(i, true, _channel.Id, _classId, true));
     }
     doh.Reset();
     doh.SqlCmd = "SELECT Id, ParentId FROM [jcms_normal_class] WHERE [IsOut]=0 AND [ChannelId]=" + _channel.Id + " AND [Id]=" + _classId;
     DataTable dtClass = doh.GetDataTable();
     if (dtClass.Rows.Count > 0 && dtClass.Rows[0]["ParentId"].ToString() != "0" && CreateParent == true)
     {
         CreateClassFile(_channel, dtClass.Rows[0]["ParentId"].ToString(), true);
     }
     dtClass.Clear();
     dtClass.Dispose();
 }