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.