Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Adding custom SVG icons to navigation menu items

theme

Started by Jon 4 years ago · 1 replies · 1358 views
4 years ago

Hello and thank you for a CMS that is a breath of fresh air! Really enjoying the flat file cms approach.

I am building a small web-store using the shop skeleton , which uses the antimatter theme. I have inherited the antimatter theme and using a custom.css and base.html.twig to get the site looking unique.

I have a number of SVG files that i have added to the footer and managed to get the SVG main site logo working (after reading this discord forum) by adding the following to base.html.twig

HTML
<div id="logo">
    <h3>
       <a href="{{ base_url == '' ? '/' : base_url }}">
          <img src="{{ url('theme://images/myshoplogo.svg') }}" />
       </a>
    </h3>
</div>

But how can i use custom SVG icons in the menu items. I looked at inheriting navigation.html.twig but then get a little lost. Is anyone able to help me here and give me a few pointers?

Thanks

last edited 05/29/22 by Jon
4 years ago

@jon,

I looked at inheriting navigation.html.twig

That seems to be a proper approach...

but then get a little lost.

  • What have you tried?
  • On what part did you get lost?
👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 4 weeks ago
4 490 3 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 811 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 669 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 690 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 652 3 months ago