View Source
Inheritance
System.Object
Assembly: Umbraco.Core.dll
[DataContract(Name = "menuItem", Namespace = "")]
public class MenuItem
Constructors
View Source
Declaration
View Source
Declaration
public MenuItem(string alias, string name)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
System.String |
name |
|
View Source
Declaration
public MenuItem(string alias, ILocalizedTextService textService)
Parameters
View Source
Create a menu item based on an IAction definition
Declaration
public MenuItem(IAction action, string name = "")
Parameters
Type |
Name |
Description |
IAction |
action |
|
System.String |
name |
|
Properties
View Source
Declaration
[IgnoreDataMember]
public IAction Action { get; set; }
Property Value
View Source
A dictionary to support any additional meta data that should be rendered for the node which is
useful for custom action commands such as 'create', 'copy', etc...
Declaration
[DataMember(Name = "metaData")]
public Dictionary<string, object> AdditionalData { get; }
Property Value
Type |
Description |
Umbraco.Cms.Core.Dictionary<System.String, System.Object> |
|
View Source
Declaration
[DataMember(Name = "alias", IsRequired = true)]
[Required]
public string Alias { get; set; }
Property Value
Type |
Description |
System.String |
|
View Source
Icon to use at action menu item.
Declaration
[DataMember(Name = "icon")]
public string Icon { get; set; }
Property Value
Type |
Description |
System.String |
|
View Source
Declaration
[DataMember(Name = "name", IsRequired = true)]
[Required]
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
View Source
Used in the UI to inform the user that the menu item will open a dialog/confirmation
Declaration
[DataMember(Name = "opensDialog")]
public bool OpensDialog { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
Ensures a menu separator will exist before this menu item
Declaration
[DataMember(Name = "separator")]
public bool SeparatorBefore { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
Declaration
[DataMember(Name = "textDescription")]
public string TextDescription { get; set; }
Property Value
Type |
Description |
System.String |
|
View Source
Used in the UI to indicate whether icons should be prefixed with "icon-".
If not legacy icon full icon name should be specified.
Declaration
[DataMember(Name = "useLegacyIcon")]
public bool UseLegacyIcon { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
View Source
Adds the required meta data to the menu item so that angular knows to attempt to call the Js method.
Declaration
public void ExecuteJsMethod(string jsToExecute)
Parameters
Type |
Name |
Description |
System.String |
jsToExecute |
|
View Source
Sets the menu item to display a dialog based on a URL path in an iframe
Declaration
public void LaunchDialogUrl(string url, string dialogTitle)
Parameters
Type |
Name |
Description |
System.String |
url |
|
System.String |
dialogTitle |
|
View Source
Sets the menu item to display a dialog based on an angular view path
Declaration
public void LaunchDialogView(string view, string dialogTitle)
Parameters
Type |
Name |
Description |
System.String |
view |
|
System.String |
dialogTitle |
|
View Source
Sets the menu item to navigate to the specified angular route path
Declaration
public void NavigateToRoute(string route)
Parameters
Type |
Name |
Description |
System.String |
route |
|