Contentment Data Picker Image

I’ve tried configuring the Contentment Data Picker three different ways to give my editors what they need:

  1. Umbraco Content: looked like I wanted it to, but I needed the ability to filter the children based on an attribute of the children.
  2. Umbraco Content by XPath: this allowed me to return the correct list of items, but the Image in the card view property editor is broken.
  3. Examine Query: this allowed me to return the correct list of items, but the Image in the card view property editor was broken.

For the Examine Query, I messed with the Icon setting. I tried : __Icon, icon, Image, image, Image:”{0}” …where Image is the attribute on the item I want to use.

Any suggestions for how to get my item.Image to work in the Data Picker property editor either using Umbraco Content by XPath or Examine Query?

Hi Ben,

As you’ve seen, only the “Umbraco Content” data-source has the “image” alias field. The only reason for this is that I needed it for a demo and didn’t think of adding it to other data-sources at the time. :see_no_evil_monkey:

The best option is to open an issue on my GitHub repo, and I’ll try to add the feature soon, (or if you have C# skills, feel free to send over a pull request :star_struck: ), then I’ll try to get a new release out (which may end up taking me a couple of weeks - as I’m limited on free time these days).

The more immediate option is to write a custom data-source, (again needs C# skills), that takes inspiration from “Umbraco Content by XPath” source-code., adding in the imageAlias bits from “Umbraco Content” source-code.

Cheers, Lee.

@leekelleher I knew Contentment is your package, but I didn’t want to bother you. Thank you for taking the time to respond! I wish I had the skills to make a PR with the solution. I’m going to work through the custom data source and see if I can get that working.

1 Like

@leekelleher I got the custom data source working. It’s a thing of beauty! Many thanks for the guidance and the indominable Contentment package!