I'm trying to create a dropdown property for macros. I have managed to do this however I can't seem to access the config values to populate it. I was hoping to have a list of values in $scope.model.config.testValue1
angular.module("umbraco").controller("My.MacroDropDownController",
function ($scope) {
if ($scope.model.config == null) {
alert('still null!');
}
else {
alert('HAS A VALUE!');
}
});
You can use a custom 'property editor' for a 'Data Type' or for a 'Macro Parameter', but you can't use a Data Type for a Macro Parameter, if that makes sense ?
I mean it would make sense if you could...
but at the moment, there is no UI to provide the prevalues when the property editor is used as a Macro Parameter, which is why scope.config is always null.
In the past I've hardcoded the prevalues inside the 'property editor' :-( I guess you could maybe have them in your own config file, read into the editor...
$scope.model.config is always null
I'm trying to create a dropdown property for macros. I have managed to do this however I can't seem to access the config values to populate it. I was hoping to have a list of values in $scope.model.config.testValue1
Here is my manifest:
}
I've added them in the Data Types section and can see it in the database.
Any ideas why $scope.model.config is always null?
Hi Simon
You can use a custom 'property editor' for a 'Data Type' or for a 'Macro Parameter', but you can't use a Data Type for a Macro Parameter, if that makes sense ?
I mean it would make sense if you could...
but at the moment, there is no UI to provide the prevalues when the property editor is used as a Macro Parameter, which is why scope.config is always null.
In the past I've hardcoded the prevalues inside the 'property editor' :-( I guess you could maybe have them in your own config file, read into the editor...
regards
Marc
Thanks Marc, I had a bad feeling it was going to be something like that.
As you say I'll probably add the values to a config file then load them based on an alias suffix.
is working on a reply...