protected override void OnPreRender(EventArgs e)
        {
            this.AddCssClass("page");
            if (InternalPortalId.HasValue)
            {
                Services.Parameters.Add("PortalId", InternalPortalId.Value.ToString(CultureInfo.InvariantCulture));
            }

            Services.Parameters.Add("includeDisabled", IncludeDisabledTabs.ToString().ToLowerInvariant());
            Services.Parameters.Add("includeAllTypes", IncludeAllTabTypes.ToString().ToLowerInvariant());
            Services.Parameters.Add("includeActive", IncludeActiveTab.ToString().ToLowerInvariant());
            Services.Parameters.Add("includeHostPages", (IncludeHostPages && UserController.Instance.GetCurrentUserInfo().IsSuperUser).ToString().ToLowerInvariant());
            Services.Parameters.Add("roles", string.Join(";", Roles.ToArray()));

            base.OnPreRender(e);

            //add the selected folder's level path so that it can expand to the selected node in client side.
            var selectedPage = SelectedPage;

            if (selectedPage != null && selectedPage.ParentId > Null.NullInteger)
            {
                var tabLevel  = string.Empty;
                var parentTab = TabController.Instance.GetTab(selectedPage.ParentId, PortalId, false);
                while (parentTab != null)
                {
                    tabLevel  = string.Format("{0},{1}", parentTab.TabID, tabLevel);
                    parentTab = TabController.Instance.GetTab(parentTab.ParentId, PortalId, false);
                }

                ExpandPath = tabLevel.TrimEnd(',');
            }
        }
Beispiel #2
0
        protected override void OnPreRender(EventArgs e)
        {
            this.AddCssClass("page");
            if (InternalPortalId.HasValue)
            {
                Services.Parameters.Add("PortalId", InternalPortalId.Value.ToString(CultureInfo.InvariantCulture));
            }

            Services.Parameters.Add("includeDisabled", IncludeDisabledTabs.ToString().ToLowerInvariant());
            Services.Parameters.Add("includeAllTypes", IncludeAllTabTypes.ToString().ToLowerInvariant());

            base.OnPreRender(e);
        }