I am quite new to Kirby and PHP and really appreciate some help here:
I have 3 different sizes for the cover images that I want to display on the homepage. I created a blueprint for the cover images with a select field (small, big, medium) and I am using if/else if statements to display them on the homepage according to this field. So far I managed to show only the big & medium sizes, the small sizes are being displayed as medium, meaning the last “elseif” statement is not working. If I deleted the medium statement the small images are shown so the problem is having 2 elseif statements. can somebody help me to solve this? or point me in a better solution? (I have the feeling I am repeating a lot of code). thank you so much!! here is my code:
You’re right, completely forgot to add the images, now it’s working!! thank you so much for the help and quick reply!!!
I just have another question, in order to make this work I added the select field to the cover image template which means on the panel I have to click on the image to see this field. Is there a way to have the field on the panel near the other fields? (I now I am using a cover template and that’s why this is happening, but when I tried using a select field on the page it didn’t work because there was no relation to the image)
here my page blueprint: