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);
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();
}
}