Hello, I have a few settings that need to use site wide, image upload and some some custom css controls on every page.
I’ve tried using <?= $page->cover() ?> but no luck, site->cover works but it’s not available on the rast of the pages. I’ve tried this in a new way <?= $page->theme()->or($site->theme()) ?> still I feel it’s kinda wrong.
my final problem is uploading a cover image using this blueprint:
cover:
lable: Cover
type: files
query: images
When I try to export using $page->cover()->url I get only the file name not the whole url to the file
A files field only stores the id of a file, you have to convert the field value to a file object first to be able to call any member methods like url() etc. on the object:
Thanks for the reply, I managed to get it working tho not in a traditional way. I had to make two header snippets similar to this one, one for site and one for page:
Might be true, tho I have no experience with php what so ever. What was put up there is a compilation of things i’ve found on the internet, trying to see if Kirby and I fit.
I only know HTML and CSS at the moment, as I am into design and this role demands it. Maybe it’s time to learn php. I would pick something else but I’m scared of Javascript