This project is read-only.

Menu/Breadcrumb Data in Search Results View

Topics: Customizing Orchard
Apr 1, 2013 at 8:49 PM
Edited Apr 1, 2013 at 8:52 PM
I have a basic projection in my Orchard project that displays the results of a query based on search terms passed in the querystring, and I have an alternate view set up and working for the projection (List-ProjectionPage-url-[my url].cshtml. All good so far.

I also have a menu set up in the Navigation section that contains a bunch of nested content menu items. Some of the content that appears in the list of my search projection will be connected to the content menu items in my menu, and in those cases I would like to be able to display a "breadcrumb" trail that shows where the content item is located in the menu hierarchy. For instance, if I had a content item called "Contact Us" and a menu with nested content menu items that looked like this:

-->About Us
---->Contact Us

I would like the search results to show:
  • Contact Us (Home > About Us > Contact Us)
If I was able to get the model for the navigation menu in my projection alternate view then I would have no problem writing an HTML helper that would achieve this effect since I would be able to use the content item's URL to connect it to the URL data in the menu model. However, I can't figure out how to get access to the menu model from the projection alternate view. Perhaps there is another way to do it as well. Any help is greatly appreciated.
Jul 4, 2013 at 4:08 PM
I am looking the same... Unfortunatley the Piotr Szmyd Hierarchical menu link is down. If you already did it please post it here..