I have created several webpartpages, in the module xml file I set the page to be deployed to the Pages library.

When I'm browsing the site I can see that the names of my webpartpages are shown in the TopNavigation Menu.

How can I set that those names won't be shown in the menu ? (programmatically)

TIA Ronen


I believe several clarifications are needed - You say "Web part pages" and than "Pages" library (Publishing site usually) - even if you can do that is not really recomanded! You need to deploy Publishing Pages based on Layouts usually.

Now - the top navigation is configurable via the Site Settings > Top-link bar or Quick Launch (for left navigation), but i believe you have a Publishing Site, which is configured via Site Settings > Navigation, and there you should un-check the "Pages" checkbox in the Global Navigation.

  • I'll try to clarify I created a "Web Part Page" from within VS2012, so when I deploy the solution I set the location which this "Web Part Page" will reside. In Elemens.xml I did : <Module Name="HRPages" Url="Pages"> So after deploy my "Web Part Page" copied to Pages library. Maybe I should copy those "Web Part Pages" to a different location so they won't be shown in the TopNavigation ? Also as you stated the site setting - navigation is a powerful option if there is no solution to set it programmatically – Ronen Apr 4 '13 at 10:58
  • just to mention even if I hide the pages I don't want to see in the Site Setting-navigation , after deployed they showing again.... That's why I wanted to know if I can set a hide property for them already in the deploy process – Ronen Apr 4 '13 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.