Custom menu component MVC UI #16353
Description
Resolves #16352
Checklist
- I fully tested it as developer / designer and created unit / integration tests
- I documented it (or no need to document or I will create a separate documentation issue)
- I worked with the design team to get their idea for UI/UX design (or no need to design for this PR)
- I've assigned reviewer, related labels and set a milestone for this PR
How to test it?
public class CustomMenuViewComponent : AbpViewComponent
{
public IViewComponentResult Invoke()
{
return View("~/Components/Default.cshtml");
}
}
<li class="nav-item">
<a>
Custom Menu
</a>
</li>
context.Menu.AddItem(
new ApplicationMenuItem(
"Custom menu",
l["Custom menu"],
"#",
order: 2
).UseComponent<CustomMenuViewComponent>()
);