Welcome Guest Search | Active Topics | Sign In | Register

menu items visble Options
Jim Nelson
Posted: Tuesday, April 26, 2011 6:02:39 PM
Rank: Member
Groups: Member

Joined: 9/1/2010
Posts: 28
trying to disable a menu item.
using a site.master.

*** this works ****

EO.Web.Menu control = (EO.Web.Menu)Page.Master.FindControl("menu1");
control.Items[2].Visible = false;

*** this gets an error ***

control.FindItem("File/Categories").Visible = false;

here is some of the HTML from the menu.

<eo:Menu ID="Menu1" runat="server" ControlSkinID="MSDN" Width="360px">
<TopGroup Style-CssText="background-color:#cccccc;border-bottom-color:#cc0000;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#cc0000;border-left-style:solid;border-left-width:1px;border-right-color:#cc0000;border-right-style:solid;border-right-width:1px;border-top-color:#cc0000;border-top-style:solid;border-top-width:1px;color:#000066;">
<Items>
<eo:MenuItem Text-Html="Home" NavigateUrl="~/control.aspx">
</eo:MenuItem>
<eo:MenuItem AllowRoles="" NavigateUrl="" Text-Html="File" ToolTip="Maintenance">
<SubMenu>
<Items>
<eo:MenuItem NavigateUrl="~/global.aspx" Text-Html="Global Parameters">
</eo:MenuItem>
<eo:MenuItem NavigateUrl="~/workgroup.aspx" Text-Html="Workgroups">
</eo:MenuItem>
<eo:MenuItem NavigateUrl="~/category.aspx" Text-Html="Categories">
</eo:MenuItem>


Please advise.
thx
eo_support
Posted: Wednesday, April 27, 2011 10:32:52 AM
Rank: Administration
Groups: Administration

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

FindItem searches for item by item path, not item text.

Thanks
Jim Nelson
Posted: Wednesday, April 27, 2011 10:38:47 AM
Rank: Member
Groups: Member

Joined: 9/1/2010
Posts: 28
Thats fine. Where do I get item path?
eo_support
Posted: Wednesday, April 27, 2011 10:43:13 AM
Rank: Administration
Groups: Administration

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

Please check the reference for FindItem. Look for the description for the "path" argument. Follow the link and you will have everything about the item path.

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.