When you insert and image into the markdown of a page content from the editor, either by dragging/dropping or via the plus icon on the hover menu. Is it possible for the inserted markdown code, e.g. !(alt text)[image.jpg "image title"), to be read from an existing .meta.yaml file if present.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Not without coding, which I am guessing is off the table.
The best approach would be to customise your Twig template (so further down the pipeline) so that it pulls this information from your .meta.yaml file and adds it as a title attribute.
Yeah that is a bit beyond me but thanks for the direction. Maybe when I have spent more time with Grav I will investigate
I did something like this for Blog image headers, where you could provide some image credit text and even a link to be overlaid with the image, in my Open Bootstrap 4 theme - sample Twig https://github.com/hibbitts-design/grav-theme-bootstrap4-open-matter/blob/master/templates/partials/blog_item.html.twig#L76-L101 and live sample image https://demo.hibbittsdesign.org/grav-open-matter-course-hub/home/module-04
I am sure (LOL) that the twig could be improved but perhaps this might give you a few useful ideas etc.
Paul
Thanks Paul I will take a look
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 6 | 97 | 8 months ago | ||
| 10 | 185 | 1 year ago | ||
| 4 | 148 | 1 year ago | ||
| 3 | 61 | 1 year ago | ||
| 4 | 255 | 1 year ago |