Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Use images instead of icons in

Started by Christoph 8 years ago · 4 replies · 1905 views
8 years ago

Hello,
I'm using the deliver theme and I 'd like to set images in a grid instead of the font-awesome icons.
Replacing 'icon' with e.g. 'image' won't work.
https://learn.getgrav.org/content/image-linking only explains how to insert images in markdown.
But the grid content is in frontmatter.

Can you tell me how to solve that?

Here's the frontmattter code for one of the grids:

YAML
header: 'header text'
text: 'main text'
icon: wheelchair
linkurl: contact
linktext: 'link text'
last edited 04/21/18 by Christoph
8 years ago

The variables that are set in the frontmatter are used in the theme templates. Have a look at how the portfolio templates uses images. I'm sure you can apply that to the template which is creating your grid.

8 years ago

I ve found the following code in templates/modular/features.html.twig

TWIG
<div class="feature">
{% if feature.icon %}
<i class="fa fa-fw fa-{{ feature.icon }}"></i>
<div class="feature-content icon-offset">
{% else %}

How can I add the new type 'image'?

last edited 04/25/18 by Christoph
8 years ago

The topic is interesting, but all my efforts didn't work
Either I got an 500 Error or it just didn't show up.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by stuart young, 1 month ago
3 441 1 month ago
Themes & Styling · by Sebadamus, 1 month ago
5 457 1 month ago
Themes & Styling · by martynfoster735, 2 months ago
1 442 2 months ago
Themes & Styling · by Justin Young, 2 months ago
1 466 2 months ago
Themes & Styling · by Slebeig, 3 months ago
4 594 3 months ago