We have moved!

You are currently looking at documentation for Umbraco 8 and older versions.
An automated guess is that docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-property-editors/related-links2 could be the link to the new documentation for Umbraco 9 and newer versions.

    Related Links

    Returns: RelatedLinks

    Related Links allows an editor to add an array of links. These can either be internal Umbraco pages or external URLs.

    This property has been replaced by Multi URL Picker in Umbraco 8.

    Data Type Definition Example

    Related Links Data Type Definition

    Content Example

    Media Picker Content

    MVC View Example - value converters enabled

    The RelatedLinks do not work without Umbraco.Web.Models. Don't forget to use it.

    Typed

    @using Umbraco.Web.Models
    @{
        var typedRelatedLinksConverted = Model.Content.GetPropertyValue<RelatedLinks>("footerLinks");
    
        if (typedRelatedLinksConverted.Any())
        {
            <ul>
                @foreach (var item in typedRelatedLinksConverted)
                {
                    var linkTarget = (item.NewWindow) ? "_blank" : null;
                    <li><a href="@item.Link" target="@linkTarget">@item.Caption</a></li>
                }
            </ul>
        }
    }