Copied to clipboard

Flag this post as spam?

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


  • Mihir Ajmera 32 posts 145 karma points
    Aug 12, 2019 @ 06:34
    Mihir Ajmera
    0

    Generate Custom Checkbox List Data type using API Call in Umbraco 8.1.0

    Hello All,

    Using below reference link I generate the custom checkbox list data type and add in the document type but I can`t get the data from the custom API controller call in Umbraco 8.1.0.

    https://techiespice.com/2019/05/23/create-a-custom-property-editor-in-umbraco/

    using AuroraCapPartner.Web.Models;
    using System.Collections.Generic;
    using Umbraco.Web.Editors;
    
    namespace AuroraCapPartner.Web.WebApi
    {
    
        public class ContentController : UmbracoAuthorizedJsonController
        {
            public List<IdNameDto> Categories()
            {
                return new List<IdNameDto>()
                {
                    new IdNameDto()
                    {
                        Id = 1,
                        Name = "Reading"
                    },
                    new IdNameDto()
                    {
                        Id = 2,
                        Name = "Writing"
                    },
                    new IdNameDto()
                    {
                        Id = 3,
                        Name = "Traveling"
                    },
    
                };
            }
        }
    }
    

    I set the custom API call in the back office as display below in the screenshot.

    http://prntscr.com/orgtjg

    Can anyone have I idea about how I call custom API controller to bind the checkbox list in the content page in the Umbraco 8.1.0 version?

Please Sign in or register to post replies

Write your reply to:

Draft