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
My content has a "Featured Image" that I would like to use in a custom grid controller. So far, this is the only way I've been able to make it happen.
contentResource.getById(editorState.current.id) .then(function (content) { $scope.props = contentEditingHelper.getAllProps(content); var id = $scope.props[1].value; entityResource.getById(id, "Media").then(function (item) { $scope.control.value = item.metaData.umbracoFile.Value.src; }); });
There's got to be a simpler way, right? (preferrably one that doesn't make me hardcode an array index and drill through metadata to find an image url)
I would like to do something like:
editorState.current.parentId.featuredImage.url;
or
$scope.parent.featuredImage.url;
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Accessing Content Properties in Grid Controller
My content has a "Featured Image" that I would like to use in a custom grid controller. So far, this is the only way I've been able to make it happen.
contentResource.getById(editorState.current.id) .then(function (content) { $scope.props = contentEditingHelper.getAllProps(content); var id = $scope.props[1].value; entityResource.getById(id, "Media").then(function (item) { $scope.control.value = item.metaData.umbracoFile.Value.src; }); });
There's got to be a simpler way, right? (preferrably one that doesn't make me hardcode an array index and drill through metadata to find an image url)
I would like to do something like:
or
is working on a reply...