示例#1
0
        /// <summary>
        /// 生成文件所在目录
        /// </summary>
        /// <param name="Nodeinfo"></param>
        private void MakeHtmlFile(M_Node Nodeinfo)
        {
            string allFolder = "";
            //获得节点目录路径
            string url = "/site";

            switch (Nodeinfo.HtmlPosition)
            {
            case 0:
                allFolder = url;    //0-根目录下
                break;

            case 1:
                Pardir    = url + nll.GetDir(Nodeinfo.ParentID, ""); //继承父节点目录
                allFolder = Pardir;
                break;
            }
            //end
            allFolder = this.SiteMapath + "/" + allFolder + "/" + Nodeinfo.NodeDir;
            if (!FileSystemObject.IsExist(allFolder, FsoMethod.Folder))
            {
                FileSystemObject.CreateFileFolder(allFolder);
            }

            MakePage(Nodeinfo, allFolder);//生成静态分页
        }
示例#2
0
        private void SetCreateContent(int NodeID, int GeneralID)
        {
            string ContentPath = MakeHtmlFile(nll.SelReturnModel(NodeID)) + GetPath(NodeID + "", GeneralID);

            ContentPath = ContentPath.Replace(@"\//", @"\");
            ContentPath = ContentPath.Replace("/", @"\");

            string readpath = templateDir + "Content.aspx?itemid=" + GeneralID.ToString();

            SaveHtmlLink(DataConverter.CLng(GeneralID), "/Site" + nll.GetDir(DataConverter.CLng(NodeID), "") + GetPath(NodeID + "", GeneralID));

            string NewContent = MakeContentPage(NodeID + "", readpath);

            //end
            FileSystemObject.WriteFile(ContentPath, NewContent);
        }