Thanks! Maybe You can tell, how can I access those custom text fields?
Looking at cheat sheets under $file …
in cheat sheet listed commands works, for example:
‘text’ => (string)$image->filename()
trying similar, but this dosnt work:
‘text’ => (string)$image->text()
or
‘text’ => (string)$image->fields()->text()
p.s. trying to add file custom fields for exporting as JSON
One important thing though - if I only want a “Alternative Text” text field, or a “Featured Image ?” toggle field, to only show up for certain file types, in this case images -that isn’t possible right?
Yeah exactly @texnixe - but there might also be cases where not all “kirby file types” should be handled equally, like jpg vs. psd or code files .js vs .html - that would need filtering by extension - so maybe also a slightly more flexible solution - but your nice simplistic example, was also the first thing that came to my mind
Doesn’t sound like anything Kirby’s core/panel will be able to do soon (my personal perception), especially when foxussing not on Kirby’s file types, but such fine detailed ones.