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 trying to create a custom property editor that shows images from the current page...
is there a way to do that ???
can someone help me.
Yes, it's super easy
What property editor do you use for image-picking?
var typedMediaPickerSingle = Model.Content.GetPropertyValue<IPublishedContent>("featuredBanner");
if (typedMediaPickerSingle != null)
<img src="@typedMediaPickerSingle.Url" style="width:200px" alt="@typedMediaPickerSingle.GetPropertyValue("alt")" />
Read more about Media picker in docs - https://our.umbraco.com/documentation/getting-started/backoffice/property-editors/Built-in-Property-Editors/Media-Picker2
Thank you for your help,
sorry, I think my question wasn't clear...
I'm creating a custom property type editor called 'VR' and I want this custom property type to show an image form the same content page in the backoffice .
Are you trying to create a property type that shows all the images on the page in the backoffice?
Or do you want to show the images picked in the mediapicker in a view?
The second option is answered by Alex but if I read your question I think you mean option one?
yes Frans you are right,
I think my question wasn't clear... I'm creating a custom property type editor called 'VR' and I want this custom property type to show an image form the same content page in the backoffice.
any idea guys?
I would start with this guide:
You could tailor the assetservice to get the image you want to show.
There is no out of the box solution I'm afraid...
Properties of the same page are completely isolated, one should not know about another one... whilst it would be possible to fetch data from another property, it's just not how it should work.
Can't you create a custom property editor that has both image and whatever other info you want manage (together) as a single property?
that's actually a good idea......
i'll try it.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted