MvcSiteMapProvider icon indicating copy to clipboard operation
MvcSiteMapProvider copied to clipboard

SiteMapPathHelper without Childnodes?

Open gkoletzki opened this issue 11 years ago • 5 comments

Hello,

I use the @Html.MvcSiteMap().SiteMapPath() to create a breadcrumb. I will create a Breadcrumb with fly out menu for the Child nodes, but I can't do this because the Childnodes collection is empty and will never filled in the SiteMapPathHelper.BuildModel.

Is any reason why the Childnodes are not filled?

If no... can you change this in the next release.... or can you explain me how I can create a Breadcrumb with fly out menu for childnodes ini the current version.

Thx a lot.

gkoletzki avatar Jan 11 '13 14:01 gkoletzki

If I understand correctly, what you describe sounds like a custom scenario that you would need to build your own model and HtmlHelper for. The SiteMapPath and Menu were not designed to work together like this.

I am interested to know why you would want to put a menu on the SiteMapPath and would like to see an example of this functionality if it exists somewhere (a link will do).

NightOwl888 avatar Apr 06 '13 11:04 NightOwl888

If I understand it correctly gkoletzki describes something like this: http://www.teehanlax.com/blog/the-tabbed-breadcrumb-navigation/

The approach is useful for complex sites, where traditional navigation schemes falls short. It would be a really nice addition to the project.

fraabye avatar Apr 22 '13 12:04 fraabye

Thanks for the link. The article was from 2007 and interestingly none of the links I looked at in the comments have navigation that looks anything like what is in the article.

You did give me some ideas, though. It would be nice to have a way to chain menus together so you can arrange them in a menu > submenu hierarchy - meaning the submenu wouldn't be visible unless you are on the right tab of the main menu. Maybe that can be done already by specifying levels? If not, I see no reason why that can't be done using the positioning information in the site map to drive it.

I haven't worked much with the actual UI components yet - my role here has mainly been to modify the back end to fix the caching issues, enable multi-tenant support, and allow the whole thing to be wired up using DI. I did all of that just to make this component compatible with my site. However, when I get to the point in my project where I am looking for ways to expand the menu, I will probably revisit this issue.

NightOwl888 avatar Apr 22 '13 15:04 NightOwl888

In my case I wish he exhibited only the current path (nodes without children), and he is showing everyone (including children).

How can I make the. SiteMapPath () show only the current path?

Ridermansb avatar Jan 18 '14 18:01 Ridermansb

@Ridermansb - Sorry, I am not sure I understand what you are referring to. Could you add some more details to your question?

NightOwl888 avatar Jan 18 '14 19:01 NightOwl888