Automatic removal of unwanted Submenus

Mar 18, 2010 at 7:18 PM

Hi

I have a sitemap something like

Main
  Sub1
  Sub2
  Sub3
Main2
  Sub4
  Sub5
  Sub6
Main3
  Sub7
  Sub8
  Sub9

What I want to happen is that when I am on a certain page it shows the All of the Main menu items, but only the submenu items for the current branch. i.e.

If I was looking at Sub5 the menu would look like this:

Main
Main2
  Sub4
  Sub5
  Sub6
Main3

If I was looking at Main3 the menu would look like this:

Main
Main2
Main3
  Sub7
  Sub8
  Sub9

Is this possible with the code as is?

If not does anyone have any suggestions as to how to add that functionality?

Cheers Mike

 

Coordinator
Mar 19, 2010 at 7:05 AM

This is not possible with the current implementation, but should be quite easy to do by copyingand adapting the Menu helper classes from http://mvcmembership.codeplex.com/SourceControl/list/changesets.

Mar 19, 2010 at 3:52 PM

Sorry, but I may be missing something. As far as I can see there are no HTML menu helper classes in the MVCMembership project.

Did you mean that I should look at modifying the Menu helper classes in the MVCSiteMap project?

 

Cheers Mike

Coordinator
Mar 22, 2010 at 8:05 AM

That should have been http://mvcsitemap.codeplex.com/SourceControl/list/changesets