WCM/PV menu modifications

I've been working on a Public View customization and I've run across an issue with the asp:menu control whilst working on the master page. I'm trying to adjust the Display levels in the menu, but whenever I change the settings, I get the following useful error:

Value cannot be null.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value

The code I'm trying to modify is the asp:menu control:

<asp:Menu runat="server" ID="TopNavMenu" RenderingMode="List" DataSourceID="SiteMapDataSource1" MaximumDynamicDisplayLevels="0" StaticDisplayLevels="1" OnMenuItemDataBound="TopNavMenu_MenuItemDataBound" OnDataBound="TopNavMenu_DataBound">

I'm thinking the issue is in the DataBound settings, as when I remove those options and set the StaticDisplayLevels to 2, I do see the second level of items from the sitemap - of course, I see EVERYTHING in the sitemap (or at least the first two levels), which I do not want. I do want to hide the visible='false' nodes and also the license restricted nodes shouldn't show up.

I'd like to remove the main horizontal navigation and add a vertical, potentially dynamic, navigation using this menu control. Any ideas? thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Try changing the display

Try changing the display levels from withing the WCM - Edit Site properties. Look at the navigation tab, select Primary Navigation and click the little pencil icon. This opens an interface to change your dynamic or static display levels.