A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Connecting my submenu to my leftmenu?

Vote:
 

http://world.episerver.com/Get-Started/EPiServer-CMS/Getting-Started---How-To/Create-a-Sub-Menu-with-EPiServerPageTree/

TopMenu - Level 1
SubMenu - Level 2
LeftMenu - Level 3

I've created a submenu using the article above. It's working fine. But my "leftmenu" shows the tree from my Level2, not Level3 that I want.
My guess is I'm trying to set the leftmenu to early, so it gets the values from the TopMenu not the submenus own values.

Any ideas on how I can solve this?
/Markus

 

---------------------------------------------
In my master. pages OnLoad I assing the values for the TopMenu to the SubMenu. And SubMenu to the LeftMenu. 
protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (SubMenu != null && TopMenu != null)
            {
                SubMenu.subml = TopMenu.MenuListControl;
            }

            if (LeftMenu != null && TopMenu != null)
            {
                         LeftMenu.MenuList = SubMenu.subml;
            }
        }

And in my leftmenu I set the pagelink to the OpenTopPage.

protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            if (_menuList != null)
            {
                PageTreeControl.PageLink = MenuList.OpenTopPage;
                PageTreeControl.DataBind();
            }
          
        }

#51409
Jun 07, 2011 15:55
* 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.