Exemplo n.º 1
0
    private void Page_Controls()
    {
        // Load MasterPage Control
        Nexus.Core.Templates.MasterPageMgr myMasterPageMgr = new Nexus.Core.Templates.MasterPageMgr();
        myMasterPageMgr.Load_MasterPageControls_WebView(this.Page, myPage_Loading_Info.MasterPageIndexID);

        // Load Page Control
        Nexus.Core.Pages.PageMgr myPageMgr = new Nexus.Core.Pages.PageMgr();
        myPageMgr.Load_PageControls_WebView(this.Page, myPage_Loading_Info);
    }
Exemplo n.º 2
0
        protected override void OnPreInit(EventArgs e)
        {
            Nexus.Core.Pages.PageMgr myPageMgr = new Nexus.Core.Pages.PageMgr();

            // Check _pageindexid
            _pageindexid = Request["PageIndexID"];

            if (DataEval.IsEmptyQuery(_pageindexid) || !myPageMgr.Chk_PageIndexID(_pageindexid) || !Convert.ToBoolean(Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch")))
            {
                // PageIndexID not exist go to homepage
                _pageindexid = myPageMgr.Get_Homepage_PageIndexID();

                if (DataEval.IsEmptyQuery(_pageindexid) || !myPageMgr.Chk_PageIndexID(_pageindexid) || !Convert.ToBoolean(Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch")))
                {
                    return;
                }
                else
                {
                    URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr();
                    string             realUrl  = myUrlMgr.Get_PageIndex_PageURL(_pageindexid);
                    string             args     = Request.QueryString.ToString();
                    realUrl = Tools.URLParse.Combine_Arg(realUrl, args);

                    Response.Redirect(realUrl);
                }
            }


            // Check Page Types
            Nexus.Core.Pages.PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

            switch (myPageIndex.Page_Type)
            {
            case Page_Type.Normal_Page:
                Load_Normal_Page(_pageindexid);
                break;

            case Page_Type.Category:
                Load_Category(_pageindexid);
                break;

            case Page_Type.Internal_Page_Pointer:
                Load_Internal_Page(_pageindexid);
                break;

            case Page_Type.External_Link:
                Load_External_Page(_pageindexid);
                break;
            }

            base.OnPreInit(e);
        }
Exemplo n.º 3
0
    protected override void OnPreInit(EventArgs e)
    {
        //myPage_Loading_Info = new Nexus.Core.Pages.Page_Loading_Info();

        // Check _pageindexid
        string _pageindexid = Request["PageIndexID"];

        if (DataEval.IsEmptyQuery(_pageindexid))
        {
            // URLrewrite
            _pageindexid = "1";
        }

        // Check PageExist
        Nexus.Core.Pages.PageMgr   myPageMgr   = new Nexus.Core.Pages.PageMgr();
        Nexus.Core.Pages.PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

        // Check Properties

        // Check Security

        // Load Pages Template
        Nexus.Core.Pages.Page_PropertyMgr myPropertyMgr = new Nexus.Core.Pages.Page_PropertyMgr();

        myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_pageindexid);

        // Get MasterPageID
        //_master_pageindexid = myPage_Loading_Info.MasterPageIndexID;

        //this.StyleSheetTheme = myPage_Loading_Info.Theme;
        this.Theme          = myPage_Loading_Info.Theme;
        this.MasterPageFile = myPage_Loading_Info.MasterPage_URL;

        this.Title = myPage_Loading_Info.Page_Title;

        base.OnPreInit(e);
    }