Menu Items are a standard Umbraco concept and are used to configure items that appear in the tree context menu and list view / editor action menus.
To define a menu item you create a class that inherits from the base class MenuItem
and configure it within the constructor like so.
// Example
public class ExportMenuItem : MenuItem
{
public ExportMenuItem()
{
// Configure menu item
Name = "Export";
Alias = "export";
Icon = "download"; // Exclude the "icon-" prefix
// Set action behaviour
NavigateToRoute("/my/angular/route");
}
}
Available configuration options are:
In addition, there are three options for the type of action the menu item should perform:
You can find more detailed information on MenuItem
class over at the offical Umbraco Menu Item documentation
As well as defining the menu item class, depending on the action type you configure, you will also need to implement the relevant angular view and controller. This is a little out of scope for the Fluidity documentation, however in summary you will want to:
package.manifest
file in your plugin folder.ng-controller
attribute.package.manifest
.Menu items are added to a collection as part of the collections configuration. See Collections API documentation for more info.