Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ras 66 posts 330 karma points
    Jan 21, 2022 @ 12:36
    Ras
    0

    Having trouble programmatically creating Umbraco.MultiUrlPicker

    Hello, the code I have right now while attempting to create a document type that includes Umbraco.MultiUrlPicker with some static data looks like this:

                    ReadMoreLinks = new List<Link>
                    {
                        new Link
                        {
                            Target = "_blank",
                            Name = "Test link",
                            Url = "https://google.com",
                            Type = LinkType.External,
                            Udi = Udi.Create(Constants.UdiEntityType.Document, Guid.NewGuid())
                        }
                    },
    

    I initially tried creating it without any sort of Udi/Guid, which successfully creates the link in the picker but throws an error while browsing the site. When I have the code as above it doesn't create it at all. I've tried a few different variations but I'm not sure how to go about this anymore. Thanks in advance

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies