Created
June 20, 2018 15:18
-
-
Save kgiszewski/bf49702c5a7467c902fc9063dd9d1bc3 to your computer and use it in GitHub Desktop.
DDL Label Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getDdlValue = function(selectedValue) { | |
return function(dataTypeResource) { | |
//it'd be nice to trade out the 1055 a dynamic value, but good nuff for now | |
return dataTypeResource.getPreValues("Umbraco.DropDown.Flexible", 1055).then(function (prevalues) { | |
var values = prevalues[1].value; | |
var actualValue = values[selectedValue[0]].value; | |
return actualValue; | |
}); | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"javascript": [ | |
"~/App_Plugins/ArchetypeLabels/labels.js" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment