Adding thumbnails to the radio field is not possible. You’d have to opt for the imageradio field. It doesn’t support the controlledList stuff, though, and you would have to use either a JSON API for the query or combine the two fields, which is not that complicated, I think.
Your controlledList plugin should look something like this:
Thank you for your answer ! Yes I saw imageradio and that it dosen’t support the controlledList stuff too. I tried the plugin you wrote but it make the same (only one image)… Then I’ll try to do JSON…
I did something else, but it’s the first time I do JSON, I don’t know if I’m right… I did a folder “api” in “expositions” in the content with a expositions-api.txt inside. After in the templates folder I did an exposition-api.php where I wrote
There are several problems with your code (the cookbook recipe is not the right documentation for this, but the select/radio/checkboxes field documentation)
In that JSON, store the URI of the page as key, and the title as value.
Secondly, to have an api.json URL, you have to put that code into an api.json.php template (without the header) and create an empty standard api.php template.
Sorry, there are some points I don’t have… How can I store store the URI of the page as key, and the title as value ? I put nothing in my api.php and the url expositions/api.json is to put in the blueprint ?
imagelist:
label: Image List
type: imageradio
columns: 3
options: url
url: expositions/api.json # assuming your subpage in the expositions folder is called `api`
The alternative to creating these templates is using a route.