Hello. I have probably stupid question but I had not found any materials about the topic. The case is that I have block list which accept element with field media picker 3 /the new one from v8.14/ and I try to implement angular view to have preview in the backoffice but when I get the object for image it has only mediaKey I try to get media item by using mediaResource in angular controller but nothing. I saw that mediaResource accept int id. Please if someone can give me some direction Ill appreciate
@Bo Jacobsen Probably I did not wrote the question right. I have block list with elemnt inside which elemnt contain one property media picker in the preview I set div tag to show me the object which I get from block.data and the media item has only 4 properties the two of them was key mediaKey and the others was type or smth like that
Block list custom preview
Hello. I have probably stupid question but I had not found any materials about the topic. The case is that I have block list which accept element with field media picker 3 /the new one from v8.14/ and I try to implement angular view to have preview in the backoffice but when I get the object for image it has only mediaKey I try to get media item by using mediaResource in angular controller but nothing. I saw that mediaResource accept int id. Please if someone can give me some direction Ill appreciate
So
mediaResource.getById
only returns a key?You could also try
entityResource.getById
, but cant remember if thats get directly from the database.@Bo Jacobsen Probably I did not wrote the question right. I have block list with elemnt inside which elemnt contain one property media picker in the preview I set div tag to show me the object which I get from block.data and the media item has only 4 properties the two of them was key mediaKey and the others was type or smth like that
Okay, you need to make your own preview controller and get all the data you need and display.
A better description is here https://our.umbraco.com/Documentation/Fundamentals/Backoffice/property-editors/built-in-property-editors/Block-List-Editor/
is working on a reply...