Search code examples
umbraco7

Is there a way to dynamically generate dropdownoptions in Umbraco 7.3 backoffice?


I have a folderstructure that looks a little like this (DocumentType in square brackets):

Municipality [Landingpage]
    |_Areas [Area]
    |_Plot [Plot]
    |_Subdivision [Zoning]
    |  |_Ballig, Falkevej [Zone]
    |  |_Durup, Torpager [Zone]
    |  |_...
    |  |_Vinkel, Vinkelpletvej [Zone]
    |_Properties [Properties]
       |_Private Homes [Types]
       |_Coporate Buildings [Types]
       |_Other Buildinglots [Types]

In each [Zone] I would like to have a dropdown called "Type". And that type should be a value matching the name of one of the [Properties] [Types].

Visual example (comma separation = new option in dropdown): Visual exmaple


Solution

  • You could try nuPickers (https://our.umbraco.com/packages/backoffice-extensions/nupickers/) - there's an XML data source that let's you do Xpath for content (https://github.com/uComponents/nuPickers/wiki/Data-Source-Xml).

    You'd be setting "Options Xpath" to something like "//Types" to get all document of type "Types" in a dropdown. I think (haven't used nuPickers for a while).