Welcome Guest Search | Active Topics | Sign In | Register

Parent group for MenuItem? Options
Laurynas
Posted: Thursday, November 25, 2010 8:24:33 AM
Rank: Advanced Member
Groups: Member

Joined: 3/23/2010
Posts: 35
Hello,

Is there a way to obtain a MenuGroup object that is parent to a MenuItem?

We are using XML files to databind menus. These XML files have not only nodes that describe menu items, but also context nodes that should not be included in menu hierarchy.
Current implementation simply hides them using Visible property. Better approach would be to remove them from hierarchy when data binding, but I need to access parent MenuGroup to do that.

Thanks
eo_support
Posted: Thursday, November 25, 2010 9:37:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to cast this property to a MenuItem to get the parent item:

http://doc.essentialobjects.com/library/1/eo.web.navigationitem.parentnavigationitem.aspx

Once you have the parent item, you can access the parent item's SubMenu property to get the parent group.

Thanks!
Laurynas
Posted: Thursday, November 25, 2010 9:42:05 AM
Rank: Advanced Member
Groups: Member

Joined: 3/23/2010
Posts: 35
Thanks. Somehow I missed SubMenu property.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.