MenuList.OpenTopPage is always the startpage?

Vote:
 
Should´t this be the selected/expanded item in the menulist?
#15671
Mar 25, 2008 18:59
Vote:
 
This was a defect behavior in the RC1 that has now been addressed. It is actually the same issue that is disscussed in this thread http://www.episerver.com/en/EPiServer_Knowledge_Center/Developer-Forum2/EPiServer-Developer-Forums-/EPiServer-CMS-version-5/11488
#16115
Mar 25, 2008 19:08
Vote:
 
Ok i see...
#16116
Mar 25, 2008 19:08
Vote:
 

Any development on this?

In PageTree I get the same problem when I want to restrict access to startpage and get a accessdenied to startpage on my pagetree databind. For some reason the EPiServer.Web.WebControls.PageTreeData.GetExpandedPages goes up all the way to startpage and not to where i set my pagelink.

[AccessDeniedException: Access was denied to page 3.]
   EPiServer.PageBase.GetPage(PageReference pageLink) +243
   EPiServer.Web.WebControls.PageTreeData.GetExpandedPages(PageReference pageLink) +161
   EPiServer.Web.WebControls.PageTreeData.get_OpenPages() +101
   EPiServer.Web.WebControls.PageTreeData.get_OpenTopPage() +55
   xxx.Page_Load(Object sender, EventArgs e) in C:\xxx\xxx.ascx.cs:67
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99

Am I doing something wrong here or is there a workaround?

-Kjetil Simensen

#25780
Nov 05, 2008 17:19
Vote:
 

I made a workaround on this that for the time being seem to solve my problem. My "fix" was easy enough;

I created my own CustomPageTree that inherited from PageTree and wherre I overrided GetExpandedPages, and in that method I simply changed the GetPage call to this:

parentLink = DataFactory.Instance.GetPage(parentLink, AccessLevel.NoAccess).ParentLink;

 Worked for me :)

 -Kjetil Simensen

#25790
Nov 06, 2008 9:53
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.