Can’t get {{item.image.caption}} to work
… I can call {{item.image.alt}} to work as a caption in the meantime
But wondering why it won’t call the caption … am I missing magic syntax ?
Have tried caption with and without “"
Can’t get {{item.image.caption}} to work
… I can call {{item.image.alt}} to work as a caption in the meantime
But wondering why it won’t call the caption … am I missing magic syntax ?
Have tried caption with and without “"
The issue is most likely that Elements CMS doesn’t currently map nested keys (like item.image.caption). We’d have to manually add support for “caption” inside of an image. I’d need @ben to confirm this.
However, we do also support the title key on an image, so maybe a combination of title and alt will work for you?
image:
src: blog/welcome.jpg
title: "Title of my image"
alt: "Alt text for my image"
Caption is mentioned in the manual
Thank you for your input - will try to use title for caption - think that’s what you’re suggesting
Glad that’s working for you!
We have updated the manual, you can learn more about using images in front matter here:
Great - but controlling image sizes within markup is a bigger issue
If you want to put the image with the markup language text you can use
<img src="/resources/imagename.jpg" alt="Alt Text" width="50%">
or add
style="float:right;width:16rem;max-width:40vw;margin:0 0 0.5rem 1rem;border-radius:12px;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);object-fit:cover;"
Example: Artikel | CORNROW
use to see what i have done:
view-source:www.cornrow.de/artikel/curly_treffen_in_s_ddeutschland
Line 718ff
You’ve given that dog a wooden leg !
Yes, that happened on the last ocean crossing. He saw a whale and wanted to retrieve it.