Hello,
I'm a new user of grav. So sorry if my question is very basic. I would like to add a link to the images that display in a collection of pages. I have tried several tracks but without success. Here is the page header (projets.md)
projets:
-
title: x
icon: s1.png
-
title: y
icon: 's2.png'
and the twig template
{% if page.header.projets %}
<div class="row">
{% for projets in page.header.projets %}
<div class="col-lg-3 col-sm-6 col-md-3 os-animation" data-os-animation="fadeInLeft" data-os-animation-delay="0.4s">
{{ page.media.images[projets.icon].cache.html()|raw }}
<h3>{{ projets.title|raw }}</h3>
</div>
{% endfor %}
</div>
{% endif %}
The theme is mache
I've tried to add icon_url in the page header but I have an error message. I don't understand where i have to put the link and why I have this error message :
Error: Invalid Frontmatter (...) **Failed to read /.../grav/user/pages/01.home/_projets/projets.md: You cannot define a mapping item when in a sequence at line 4 (near "icon_url:
Thanks for your help !