Professional Documents
Culture Documents
on .NET Using the Hierarchical menu Orchard module
Thoughts on .NET
I'm Piotr Szmyd, a .NET junkie and Orchard enthusiast living in the beautiful city of
Warsaw. I also co‐founded and serve as a Chief Geek @ Proligence Ltd.
SPONSORED BY
Tweets by @pszmyd
Orchard module
Tags: orchard, menu, english
Many of you asked me to provide the explanation of how to use the hierarchical menu module. As the new
release arrived I took all features together and wrote this short tutorial. Also, I’d like to thank the
community for the info about the ordering issue – I’ve managed to fix it in the recent version.
Main features
Initially, module had only the functionality to build the menu hierarchy based on a menu items’ Position
http://www.szmyd.com.pl/blog/usingthehierarchicalmenuorchardmodule#.VSe86fmUc3g 1/5
4/10/2015 Thoughts on .NET Using the Hierarchical menu Orchard module
property. In the latest version I added some new features, also in high demand – the breadcrumbs shape
and widget, the sub‐menu widget and the recently seen widget.
Breadcrumbs
You can add the breadcrumbs to your site in two ways:
The most suitable zone for placing Breadcrumbs, as shown on screenshot, is BeforeContent, but you are
free to choose different one.
Sub‐menu widget
http://www.szmyd.com.pl/blog/usingthehierarchicalmenuorchardmodule#.VSe86fmUc3g 2/5
4/10/2015 Thoughts on .NET Using the Hierarchical menu Orchard module
Widget you can place on your pages, to display an additional menu. When creating a widget, you can
choose from 3 different display modes:
AllItems – displays all items from the given menu ﴾though resembling the default menu﴿
SubItems – displays only the items from given menu placed below the currently displayed item
SameLevel – displays items from the given menu placed on the same level as currently displayed item
And this is how each of those display modes look like, assuming you are currently on page named
“Second 1.2” as shown on picture below. It’s a screenshot from the ThemeMachine theme.
The currently visited item is marked with the “current” CSS class to allow easy styling, but unfortunately the
ThemeMachine theme doesn’t display it differently out‐of‐the‐box.
Positive filtering regular expression – only URLs matching this pattern will be displayed ﴾white‐
list﴿
Negative filtering regular expression – URLs matching this pattern won’t be displayed ﴾black‐list﴿
You can use any combination of both to achieve the desired output. If you specify both expressions – the
displayed URLs set will correspond to the intersection of both of result sets.
In the example below I entered a simple expression for filtering the visits to admin panel ﴾/Admin﴿ and
http://www.szmyd.com.pl/blog/usingthehierarchicalmenuorchardmodule#.VSe86fmUc3g 3/5
4/10/2015 Thoughts on .NET Using the Hierarchical menu Orchard module
You can find more information about regular expressions syntax here and here, and in lots of other
available sources on the web.
There should also be a parameter specifying whether to display the visit count for each URL, but somehow I
forgot to include it with this release, for what I want to apologize. This and another parameter – limiting the
number of links displayed will both be available in the next release, coming in the next few days.
I will write about it in the next article and try to provide you some examples, so stay tuned!
I’d be grateful for posting your comments about problems, if any – I’ll do my best to help. If you think some
feature would be useful, but isn’t here yet – also don’t hesitate to post your proposition – I’ll see what I can
do.
Cheers!
Start the discussion…
Be the first to comment.
http://www.szmyd.com.pl/blog/usingthehierarchicalmenuorchardmodule#.VSe86fmUc3g 4/5
4/10/2015 Thoughts on .NET Using the Hierarchical menu Orchard module
http://www.szmyd.com.pl/blog/usingthehierarchicalmenuorchardmodule#.VSe86fmUc3g 5/5