Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a UmbracoAuthorizedJsonController that I are calling a function from a js code for a customized App_Plugin.
This is an upgrade from a v8 umbraco App plugin to v 10.1.0
I need to get the current page property .
in version 8 my code was
foreach (IDataType dataType1 in _dataTypeService.GetAll().Where<IDataType>((Func<IDataType, bool>)(x => x.EditorAlias == "IBD.PaperFlow.Plugin"))) { if (dataType1.Key.ToString() == dataTypeKey) { dataType = _dataTypeService.GetDataType(dataType1.Id); break; } } var propEditor = current.PropertyEditors.Where(x => x.Alias == dataType.EditorAlias).FirstOrDefault();
I cannot find how I get the current property editors in version 10. The following line is the issue.
var propEditor = current.PropertyEditors.Where(x => x.Alias == dataType.EditorAlias).FirstOrDefault();
Try this:
int myId = 123; var paperFlowDataTypes = _dataTypeService.GetByEditorAlias("IBD.PaperFlow.Plugin"); var myDataType = paperFlowDataTypes.FirstOrDefault(x => x.Id == myId); var propEditor = myDataType.Editor; // do your thing with the editor
Turns out what I was trying to achieve was really easy.
I just needed to pass the value from the App_plugin $scope.model.config."value" to the controller and done.
is working on a reply...
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.
Continue discussion
Access current properties inside UmbracoAuthorizedJsonController
I have a UmbracoAuthorizedJsonController that I are calling a function from a js code for a customized App_Plugin.
This is an upgrade from a v8 umbraco App plugin to v 10.1.0
I need to get the current page property .
in version 8 my code was
I cannot find how I get the current property editors in version 10. The following line is the issue.
Try this:
Turns out what I was trying to achieve was really easy.
I just needed to pass the value from the App_plugin $scope.model.config."value" to the controller and done.
is working on a reply...
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.