Orchard extended custom background management navigation Menu Admin Menu, orchard navigation Menu

Source: Internet
Author: User

Orchard extended custom background management navigation Menu Admin Menu, orchard navigation Menu
Jin Tian: to learn a new thing, you must embrace it. If you stick to your previous concept system, you will feel difficult.Golden day:Viewing the source code is always the fastest way for Coder to learn.Jin Tian: 15998603918 welcome to chat with me. Reading this article requires a certain understanding of the Orchard general system, especially the Module plug-in system. Orchard Admin Menu to customize the background management navigation Menu, you only need to implement the interface INavigationProvider in your Module, as shown in. All that needs to be done is simple, like adding AdminMenu to implement the INavigationProvider interface. 99% of the logic is defined in GetNavigation (NavigationItemBuilder builder) menu title definition menu link definition menu position definition menu style and so on here there is a non-standard logic, the author here is called dirty logic: position (string position), normal sorting, for example,-2,-1, 1, 2, 3. If it is set to before or null, it is-9999, if you want to rank first, you need to be smaller than-9999. If you want to set it to "after", it will be 9999. If you want to rank later, you need to be greater than 9999. Note: 1. for more details about how to implement GetNavigation, refer to all the classes that implement the INavigationProvider interface in the source code. Looking at the source code is always a shortcut to coder learning. 2. Here I implement RecentMenus, which is to top the Menu from the last four points. The effect is as follows: IActionFilter is used in the middle.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.