Copied to clipboard

Flag this post as spam?

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


  • nickornotto 403 posts 907 karma points
    Oct 18, 2017 @ 13:41
    nickornotto
    0

    How to create a color swatch with nuPickers?

    I can see a colour swatch radio list in nuPickers screenshots: https://our.umbraco.org/projects/backoffice-extensions/nupickers/

    I need to create something like this for my umbraco doc type. How to do it? So far I found this thread but still have no clue how to create the radio with image labels: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53715-Datatype-image-list

    I have created a new data type nuPickers: XML RadioButton List, ith Xml Data as Media, XPath as //Image, Key XPath as @id, Label XPath as @nodeName.

    I have created a macro and this macro partial view:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @{
        <span>@Model.MacroParameters["key"]</span>
    }
    

    and selected it to use for my nuPickers data type.

    I have of course added a macro parameter with alias key.

    So far nothing displays in my content edit page and I can't see how I can set various images with radio buttons to display for selection in my content edit page.

    How to set it up?

  • nickornotto 403 posts 907 karma points
    Oct 18, 2017 @ 15:39
    nickornotto
    0

    Got it using DotNet RadioButton list :)

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Oct 18, 2017 @ 16:16
  • nickornotto 403 posts 907 karma points
    Oct 25, 2017 @ 16:38
    nickornotto
    100

    Custom labels are optional wrapper, you need to define data source first which I did using .net class: https://github.com/uComponents/nuPickers/wiki/Data-Source-DotNet

  • 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