Skip to content

Instantly share code, notes, and snippets.

@kgiszewski
Created June 20, 2018 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgiszewski/bf49702c5a7467c902fc9063dd9d1bc3 to your computer and use it in GitHub Desktop.
Save kgiszewski/bf49702c5a7467c902fc9063dd9d1bc3 to your computer and use it in GitHub Desktop.
DDL Label Template
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;
});
};
}
{
"javascript": [
"~/App_Plugins/ArchetypeLabels/labels.js"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment