KeDeX
September 9, 2025, 2:58pm
1
Hey, i try to get all the uuids from my blueprints “image” and i dont know how. I want to have it in a string like:
‘file://1rfksepqneakth4c,file://2rfksepqneakth4c,file://3rfksepqneakth4c‘ (for example)
I tried:
$i = $page→image()→toFiles()
$arr =
foreach ($i as $img) {
$arr = $i→uuid()→toString()
}
but it doesnt work like this.
This is the Blueprints Image:
image:
label: Bild
type: files
multiple: true
max: 3
layout: cards
foreach ($i as $img) {
- you will need to then also use $img
not $I
inside your loop.
KeDeX
September 9, 2025, 3:19pm
3
Yea sorry, i did it like that.
\# images
$uuids = $page->image()->toFiles();
foreach ($uuids as $uuid) {
file_put_contents(\__DIR_\_ . '/../sync-log.txt', $uuid->uuid()->toSrting(), FILE_APPEND);
}
Here it says: Call to a member function uuid() on null
KeDeX
September 9, 2025, 5:18pm
4
With this i get all the UUIDS:
$content = $page->content()->image()->toFiles();
$uuids = \[\];
foreach ($content as $uuid) {
$uuids\[\] = $uuid->uuid();
}
$uuids = implode(",", $uuids);
1 Like
Didn’t catch that, sorry! Yes indeed $page->image()
is a reserved page method. So if you use image
as field name you have to take this detour to get to your field object.