Copied to clipboard

Flag this post as spam?

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


  • aman 13 posts 123 karma points
    Aug 09, 2021 @ 06:42
    aman
    0

    Programmatically add data type to block list component

    Hello,

    I'm creating block list components programmatically following this documentation. But i have an issue with adding a property which represents a value from a dropdown data type. Could you help me to find a documentation or point me direction to look for?

    For example, there is a text string property, which I add like:

    { "text", "hello" }
    

    and this is displayed correctly. But there is also another property values of which come from a dropdown ("h2", "h3", "h4") and I also add them like above:

    { "headingType", "h2"}
    

    But for above case value is not displayed.

    I look forward for any help.

    Thanks

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Aug 09, 2021 @ 07:18
    Søren Gregersen
    100

    Hi,

    All property editors are described here https://our.umbraco.com/documentation/Fundamentals/Backoffice/Property-Editors/Built-in-Property-Editors/

    Most of them contain examples on how to set the values via the build-in services.

    The headingType seem to be custom. Is that a dropdown you created by yourself?

  • aman 13 posts 123 karma points
    Aug 09, 2021 @ 07:41
    aman
    0

    yes that is custom dropdown with values mentioned above like h2, h3, h4 when I parse manually created block list it shows value similar to simple text string data type, but not showing up when added programmatically

Please Sign in or register to post replies

Write your reply to:

Draft