Class Link
Represents a link that can point to content, media, or external URLs.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public class Link
Constructors
View SourceLink()
Declaration
public Link()
Properties
View SourceName
Gets or sets the display name of the link.
Declaration
public string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Target
Gets or sets the target attribute for the link (e.g., "_blank" for new window).
Declaration
public string? Target { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Type
Gets or sets the type of link (Content, Media, or External).
Declaration
public LinkType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| LinkType |
Udi
Gets or sets the Umbraco Data Identifier for content or media links.
Declaration
public Udi? Udi { get; set; }
Property Value
| Type | Description |
|---|---|
| Udi |
Url
Gets or sets the URL of the link.
Declaration
public string? Url { get; set; }
Property Value
| Type | Description |
|---|---|
| string |