|
Rank: Newbie Groups: Member
Joined: 12/1/2007 Posts: 8
|
Hi, I use the MS SiteMap to control my menu. I would like to add a page which does not show up in the menu. Quote: <siteMapNode url="~/shop/ShopOnline.aspx" title="Shop" description="Shop" visible="false" type="node" text-padding-right="6" text-padding-left="6" lookid="item_no_submenu" /></siteMapNode>
But visible="false" will be ignored and the entry appears in the menu. This is how I bind the datasource. Quote: MainNavigationJSMenu.DataSource = SMP_files_MainNavigationJS; MainNavigationJSMenu.DataBind();
Quote: <asp:SiteMapDataSource runat="server" ID="SMP_files_MainNavigationJS" />
<eo:Menu ID="MainNavigationJSMenu" runat="server" ControlSkinID="None" Width="200px" RaisesServerEvent="True" OnItemDataBound="MainNavigationJSMenu_ItemDataBound" > <DesignOptions ApplicationRoot="D:\Dev\WebSite\Home"></DesignOptions> </eo:Menu>
Any idea what I have to do? Thanks, Johan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That appears to be an issue. We will look into it and see if we can address it as soon as possible.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 12/1/2007 Posts: 8
|
Hi, some more information. I have implemented a "ItemDataBound" handler. But both methods "Visible=false" or "Disabled=true" will not hide the item. Quote: protected void MainNavigationJSMenu_ItemDataBound(object sender, EO.Web.NavigationItemEventArgs e) { try { if ((e != null) && (e.MenuItem != null) && (e.MenuItem is EO.Web.MenuItem)) { EO.Web.MenuItem item = e.MenuItem as EO.Web.MenuItem; SiteMapNode dataItem = item.DataItem as SiteMapNode;
if (dataItem["visible"] != null) { bool visible = true; if (bool.TryParse(dataItem["visible"] as string, out visible)) { if (visible == false) { item.Disabled = true; item.Visible= false; } } } ...
Thanks for any help. Johan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That is something interesting. Visible = False should hide the item. Disabled will not. Try comment all other code out and just set every item's Visible = false and see if that hide all items.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 12/1/2007 Posts: 8
|
Hi, I have added a "Visible=false" to ALL items und the two I tried to hide are gone now. It works but I don't know why ;) Quote: EO.Web.MenuItem item = e.MenuItem as EO.Web.MenuItem; SiteMapNode dataItem = item.DataItem as SiteMapNode; item.Visible = false;
Thanks, Johan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try debug through your code. We are not aware of any problem with MenuItem.Visible. So I am guessing item.Visible is not called as you were expecting.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Support for "visible" on site map node is added in build 2007.2.46.
|
|