This project is read-only.

How to order menu?

Topics: Administration, Core, Customizing Orchard, General
Dec 7, 2011 at 5:02 AM


I added menu from code and dashboard to my own module.Now first showing menu that added from code.I want to show first that menu which added from dashboard.I'll try to change position of navigation from dashboard.But this did not help.How I can do it?


Dec 7, 2011 at 6:31 AM

Well, that's it. It's done from the navigation screen.

Dec 7, 2011 at 7:20 AM
bertrandleroy wrote:

Well, that's it. It's done from the navigation screen.

I tried from the navigation screen.But it did not correctly work.

Ex: position of menu "Test1" from code = 5, position of menu "Test2" from the navigation screen = 1.But first showing menu "Test1".Why?How can I do?

Dec 7, 2011 at 7:36 AM

What does your code look like?

Dec 8, 2011 at 7:07 AM
Edited Dec 17, 2011 at 6:01 AM
public void GetNavigation(NavigationBuilder builder) 
builder.Add(menu => menu.Add(T("News"), "4",  item =>
 item.Action("List", "News", new { area = "MyModule"}))); 

builder.Add(menu =>menu.Add(T("Images"), "5", item =>
 item.Action("List", "Images", new { area = "MyModule"}))); 
Dec 9, 2011 at 1:43 AM

I don't know, might be worth activating shape tracing and selecting one of the items. Under the model tab, open model / item / position.

(by the way, you might want to use the "insert code snippet" in the CodePlex massage editor, to make the code more readable)

Dec 17, 2011 at 7:58 AM
Edited Dec 17, 2011 at 8:11 AM

How I can add the screenshots here?I will create issue tracker.Still not working correctly.Thanks!

Dec 20, 2011 at 10:50 AM
Are there any other variants to solve this problem?Thanks!