Welcome Guest Search | Active Topics | Sign In | Register

Removing Menu Items with no children Options
Mike Wynn
Posted: Monday, January 7, 2008 4:16:56 AM
Rank: Advanced Member
Groups: Member

Joined: 8/24/2007
Posts: 130
Hi,

I am binding a menu to a site map. The site map uses the Rolls attribute to dynamically select the menu items that are visible for the current user. I have several menu items that have no url, and are used simply to allow access to a sub-menu.

The problem I have is that there are situations where no items in a sub-menu are available to a particular user. In this case, I do not want to be displaying the sub-menu parent item, as it has no purpose.

How can I achieve this? When I handle the menu.preRender event, it states that all menu items are visible (even when they are not rendered!).

Regards
Phil
eo_support
Posted: Monday, January 7, 2008 5:44:48 AM
Rank: Administration
Groups: Administration

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

The items are disabled based on the role info on the last minute before the menu is rendered, so there is no way for you to do anything after that. The only option seems to be walk through all child items and perform the same check as the menu item performs with the role, then set the parent menu item's Visible property.

Thanks


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.