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'm working on an Umbraco 10.4 Block grid.
I have replaced dropdown with content picker in the setting model.
I'm having issue accessing the setting model value in the custom view
{{block.settingsData.pickerAlias}} returns udi (umb://document/ad2cafd7aa884e52b3b0cd0ad7137182)
{{block.settingsData.pickerAlias}}
(umb://document/ad2cafd7aa884e52b3b0cd0ad7137182)
Any possibilities to access node Name or Node Property alias value? I tried {{block.settingsData.pickerAlias.Name}} or {{block.settingsData.pickerAlias.titleAlias}} but It's not working. I can't find any documentation.
{{block.settingsData.pickerAlias.Name}}
{{block.settingsData.pickerAlias.titleAlias}}
have you tried block.settingsData.pickerAlias[0].Name
block.settingsData.pickerAlias[0].Name
Yes I tried but It's not working
Hi Roshan,
You need to inject contentResource into your angular controller and then you can do the following
contentResource.getById($scope.block.settingsData.pickerAlias) .then(function(data) { $scope.myPicker = data; });
Where to put this code? Could you please provide more details?
do you have an angular controller to go with your custom view?
How to add controller to custom view?
This explanation on this older issue might help point the way...
https://our.umbraco.com/forum/using-umbraco-and-getting-started/103560-image-in-custom-block-editor-view
Regards
Marc
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Accessing Block grid content block setting model value in custom view
I'm working on an Umbraco 10.4 Block grid.
I have replaced dropdown with content picker in the setting model.
I'm having issue accessing the setting model value in the custom view
{{block.settingsData.pickerAlias}}
returns udi(umb://document/ad2cafd7aa884e52b3b0cd0ad7137182)
Any possibilities to access node Name or Node Property alias value? I tried
{{block.settingsData.pickerAlias.Name}}
or{{block.settingsData.pickerAlias.titleAlias}}
but It's not working. I can't find any documentation.have you tried
block.settingsData.pickerAlias[0].Name
Yes I tried but It's not working
Hi Roshan,
You need to inject contentResource into your angular controller and then you can do the following
Where to put this code? Could you please provide more details?
do you have an angular controller to go with your custom view?
How to add controller to custom view?
Hi Roshan,
This explanation on this older issue might help point the way...
https://our.umbraco.com/forum/using-umbraco-and-getting-started/103560-image-in-custom-block-editor-view
Regards
Marc
is working on a reply...