Donot display the pages in page tree which are unchecked "Display in Menu"

Vote:
 

Hi,

Iam facing an issue in binding the top menu items (MenuList) to leftnenu (PageTree).

The code which i had written to bind the controls is as fallows:

SubMenu.PageLink = MenuList.OpenTopPage;

SubMenu.DataBind();

The code works fine.

But if the page "Display Visible in Menu" property is even unchecked it is still displaying in PageTree which i donot want to.

Could you please help me in solving this problem.

#33015
Sep 29, 2009 15:08
Vote:
 
You have a property on the pagetree that says "EnableVisibleInMenu", set it to true.
#33016
Sep 29, 2009 15:11
Vote:
 

Thanks for the reply.

Yes... "EnableVisibleInMenu" do helps in solving my problem if i read the pages one by one.

But here iam directly assigning like SubMenu.PageLink = MenuList.OpenTopPage;

So i cann't check that condition.

Can you please provide another snippet code for alternative to above code condition i.e which you suggested.

Thanks in advance. 

 

#33017
Sep 29, 2009 16:13
Vote:
 

SubMenu.EnableVisibleInMenu = true;

before databinding.

#33018
Sep 29, 2009 16:15
Vote:
 

Thanks for the reply. But the given code is not working for me.

Do you have any code snippet or link where i donot want to show the pages in left menu (sub menu) whose DisplayInMenu is unchecked.

#33024
Sep 30, 2009 6:37